Adding environment variables to Runtime.exec()
843798Apr 11 2005 — edited Apr 12 2005Hello,
I'm trying to use Runtime.getRuntime().exec(command, envp);
When envp is null the program launches properly. (the doc says that the subprocess inherits the environment settings of the current process).
I want to add an environment variable, so when I use an array containing only my variable (envp), the process fails. I guess it needs the variables of the current process (as used when using null).
In that case, How adding a variable instead of replacing the default ??????
(I did not see any way to retrieve these default variables so I can concatenate with the custom one)
Thanks !