Setting the environment for ProcessBuilder
I have a strange problem setting the Linux environment from Java (1.6); specifically the "PATH" variable. In a nutshell, I have a pipeline for running native processes, which uses java.lang.ProcessBuilder . The user can optionally set the environment variables via a HashMap named environment : ProcessBuilder pb = new ProcessBuilder(args); Map<String, String> env = pb.environment(); if (environment != null) env.putAll(environment); Process process = pb.start(); The env variable gets set properly, if I dump it to the console, with a correct value for the PATH variable. However, running the