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 proce
On Linux:
String path = System.getenv("HOME"); ProcessBuilder pb = new ProcessBuilder("/bin/bash","-c","export PATH=" + "PATH-TO-ADD" + ":" + path + " && exec");
In this case the PATH variable is updated as per the need and the executable is searched in new $PATH. This worked for me on Linux.
PATH
$PATH