Java ProcessBuilder: environment set correctly but still command not found
I am having troubles with Java's ProcessBuilder on an Eclipse plugin I'm developing. I correctly set the environment before calling the start() method, but when I run the program, it always returns a command not found error. When I call the command via command line it works perfectly. When I start the eclipse with the environment as I require, the command is found and the program works fine. Only when I set the environment programatically, the program fails. Here is what I have: ProcessBuilder pb = new ProcessBuilder("my_command", file, output); Map<String, String> env = pb.environment(); env