JAVA_HOME overriden by -vm param in jbe startup?
I did not install the RTC client on to the build server, just the Build System Toolkit. And when I started the jbe, I used a -vm parameter pointing to the JRE that installs with BST. And the listener works and accepts and starts requests.
But, using maven , these builds fail as the compiler can not be found. I did have set JAVA_HOME set pointing to a JDK elsewhere on the disk.
When I set the -vm option to a different JDK (so I now have 2 JDKs and a JRE with JAVA_HOME set to the unused JDK), the jbe started and the build compiled properly.
So will a build started by the jbe use the java/javac that is used in the -vm option and override the JAVA_HOME variable?
Regards,
John
But, using maven , these builds fail as the compiler can not be found. I did have set JAVA_HOME set pointing to a JDK elsewhere on the disk.
When I set the -vm option to a different JDK (so I now have 2 JDKs and a JRE with JAVA_HOME set to the unused JDK), the jbe started and the build compiled properly.
So will a build started by the jbe use the java/javac that is used in the -vm option and override the JAVA_HOME variable?
Regards,
John
Accepted answer
And when I started the jbe, I used a -vm parameter pointing to the JRE that installs with BST. And the listener works and accepts and starts requests.
But, using maven , these builds fail as the compiler can not be found. I did have set JAVA_HOME set pointing to a JDK elsewhere on the disk.
So will a build started by the jbe use the java/javac that is used in the -vm option and override the JAVA_HOME variable?
The VM used to run Maven is controlled by the "Java home" field on the Maven tab of the build definition. If you don't specify anything in that field, then the VM that is running the JBE will be the one used to run Maven. The JAVA_HOME environment variable does not control this behavior. So if you want to use different VMs for the JBE and for Maven, then you need to set the "Java home" field in the build definition.
--
David Olsen, IBM Rational, Jazz Process Team
Comments
So if you want to use different VMs for the JBE and for Maven, then you need to set the "Java home" field in the build definition.
So, we can set JBE to run with JRE 1.7 via -vm option on jbe.ini and set JAVA_HOME to JDK 1.8 location to be able to compile Java source codes at Java 8 level, which is not supported by JBE v6.0.