Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes


Accepted answer

Permanent link

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

1 vote

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.


One other answer

Permanent link
david,
that is great.
many thanks,
John

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: May 16 '12, 5:36 a.m.

Question was seen: 4,140 times

Last updated: Aug 21 '19, 4:14 a.m.

Confirmation Cancel Confirm