Compile in Java 11 on EWM build engine 7.0.2
Our product uses the EWM build engine 7.0.2SR1 to compile the product. We recently moved to Java 11 but cannot get the build engine to build in Java 11. Looks like it's always using the built in Java which is Java 8. Is there a way to point to a Java 11 instance so that we can compile in Java 11?
|
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Jan 31 '23, 2:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER The JBE is a headless Eclipse based tool. As far as I know, the configuration for it is done in a file jbe.ini that is in the same folder as the JBE exe.
You can try to use a line such as
-vm
C:/IBM/Java110/bin
to start it with a different Java version.
Otherwise, you would have to look into your build process and change that to a different Java version e.g. change the Java Home. It is impossible to tell, since there is nothing about your build process in the question.
Comments
David Blea
commented Jan 31 '23, 10:10 a.m.
Thanks. Tried replacing the JRE but got a circular reference. But I think I did finally figure out how to modify our javac ant call to point to a different JVM in order to do the compile. Thanks for the reply.
David Blea
commented Jan 31 '23, 10:12 a.m.
Thanks. Tried replacing the JRE but got a circular reference. But I think I did finally figure out how to modify our javac ant call to point to a different JVM in order to do the compile. Thanks for the reply.
David Blea
commented Jan 31 '23, 2:12 p.m.
So using the ant jacac executable argument works for the most part...except for some tasks that apparently call javac. I can't figure out how to specify the executable for those calls though...so the build still fails. I'd prefer to build under the runtime of the jbe but...I tried using the -vm option to point to a Java 11 JRE. It gets the following error. Has anyone tried to run jbe under Java 11?
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.osgi.storage.FrameworkExtensionInstaller (file:/usr/csm/csmbuild/jazz/buildsystem/buildengine/eclipse/plugins/org.eclipse.osgi_3.10.2.v20150203-1939.jar) to method java.net.URLClassLoader.addURL(java.net.URL) WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.storage.FrameworkExtensionInstaller WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release I see the same error. The reason is likely that in Java 11 and later more and more limitations are introduced. We have seen this in other areas. There might be a way to disable the checking using special parameters, but I am not deep enough to know details. |
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.