Does anyone know how to access the environment variables of the standard shell environment in Java? I am using the ProcessBuilder class and I have to specify specific environment variables used in a shell script I am running, these variables exist in the standard shell environment.
Accessing ProcessBuilder environment does not work.
You can get at the environment variables that existed when your program was created through
System.getenv():http://download.oracle.com/javase/tutorial/essential/environment/env.html
It looks like your child process should get your environment automatically.