java - Create an environment variable programmatically -
i have external program i'm running. reason, code owner didn't give me code or , documentation, know how run code written originaly executed command line , not java. effect on me application uses env variable , relay on value (a path on computer output). want change value, how can done without running batch file?
i assume executing program using 1 of runtime.exec() methods in java code create process.
note of methods allows pass environment variables process creating, example exec(string[] cmd, string[] envp).
alternatively, map returned processbuilder.environment() can manipulated same effect.
Comments
Post a Comment