Buildtoolkit/Build version for RTC Server 5.0.2 with JAVA_HOME=JDK1.5
Which version of Buildtoolkit/Build is suitable for RTC Server 5.0.2 with JAVA_HOME=JDK1.5 (mandatory for application build)?
Currently i have : OS: Linux build engine 5.2 running with IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr16-20140626_204542 (JIT enabled, AOT enabled) Apache Ant(TM) version 1.9.7 if in build definition i set JAVA_HOME=PATH_FOR_JDK1.5 i get --> BUILD FAILED java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:88) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:278) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:107) at org.apache.tools.ant.util.JAXPUtils.newParserFactory(JAXPUtils.java:122) at org.apache.tools.ant.util.JAXPUtils.getNSParserFactory(JAXPUtils.java:106) at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:174) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:245) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178) at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93) at org.apache.tools.ant.Main.runBuild(Main.java:829) at org.apache.tools.ant.Main.startAnt(Main.java:236) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112) Thanks for your support. Giorgio |
Accepted answer
If I understand the issue correctly, that is, you have set the "Java home" under the Ant Configuration in the build definition, then it is what you get (the exceptions are thrown by Ant). Effectively, you ask Ant to run with JDK 1.5, which it fails due to mismatched class version. I believe the supplied Ant libraries are built with Java 6 and you have to run it with Java 6 or newer. So, you cannot do it that way.
Instead, to build your source with JDK 1.5, you should invoke the correct compiler (javac) in the build script. To avoid confusion, you may consider using command line rather than Ant for the build. Ralph Schoon selected this answer as the correct answer
Comments
Giorgio Tarozzi
commented May 11 '16, 5:11 a.m.
Yes you've understood the issue correctly. The main problem is that the application that has to be built, has itself in the code a check condition for JDK1.5 because it has to be intregrated with Aqualogic BMP process. So javac 1.5 is mandatory.
If I understand the issue correctly, that is, you have set the "Java home" under the Ant Configuration in the build definition, then it is what you get (the exceptions are thrown by Ant). So, we can set JBE to run with JRE 1.6 via -vm option on jbe.ini and set JAVA_HOME to JDK 1.5 location to be able to compile Java source codes at Java 5 level, which is not supported by Ant. |
One other answer
Ralph Schoon (63.6k●3●36●46)
| answered May 10 '16, 7:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please read this post: The Day The JBE Stood Still and use the JDK that ships with the version of RTC you use to run the JBE. Note the build process itself can use a different JDK as far as I can tell.
Comments
Ralph Schoon
commented May 10 '16, 10:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Also note that your JBE is run with JRE 1.6, whatever your JAVA_HOME says. It is likely inconsistent.
build engine 5.2 running with IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr16-20140626_204542 (JIT enabled, AOT enabled)
Hi Ralph,
|
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.