I am having a bash script file which I am calling using the source command in a shell and is setting a number of environment variables. Then I can use all the tools the envi
Process pr = new ProcessBuilder("/bin/bash", "-c", ". env.sh; " + command).start();
Try something like this, where you both source the script and execute a subsequent command in the same shell process. Effectively you source the script every time you want to execute a command.