From: Kevin Jackson Date: 2007-06-11T12:56:19+09:00 Subject: Re: using ` and the bash source command Hi, > If you were to run your Java program itself from ruby, I would think > that you could set the JAVA_HOME environment variable directly with > ENV[JAVA_HOME] = whatever you want, before executing Java as a > child process of the Ruby program. I cannot run the Java code from the ruby program as I could be running one of several apps. I actually got the behaviour I wanted by writing to .bashrc instead of .bash_profile, so now my workflow is: - run jdk_switcher -> open terminal -> run cli java app instead of: - vi .bashrc -> modify JAVA_HOME -> open new terminal -> run cli java app. It's a hell of a lot quicker than manually editing each time and I'm fairly happy with the results and there's no need for the source command at all as the .bashrc is read every time I open a new terminal Anyway, thanks for the help/suggestions Kev