It's all about the answers!

Ask a question

JAVA_HOME overriden by -vm param in jbe startup?


john norris (20734044) | asked May 16 '12, 5:36 a.m.
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

Accepted answer


permanent link
David Olsen (5237) | answered May 16 '12, 10:12 a.m.
JAZZ DEVELOPER

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
Ralph Schoon selected this answer as the correct answer

Comments
SEC Servizi commented Aug 21 '19, 4:14 a.m.
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.

One other answer



permanent link
john norris (20734044) | answered May 17 '12, 8:03 a.m.
david,
that is great.
many thanks,
John

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.