It's all about the answers!

Ask a question

RTC Build Definition running a Java Application error


Lilian Galicia (625) | asked Jul 08 '14, 8:18 p.m.
 hi there 

Within a build definition I have set a task of ANT me running a Java application. I tried different settings, however, to run the Build, I get the message: 

[exec] The java class Could not be loaded. java.lang.UnsupportedClassVersionError: (com / ibm / ram / ​​extension / app / ActualizaArtefactoRAM) bad major version at offset = 6 

This is my configuration in ANT: 

<exec executable="cmd"> 
<arg value="/c"/> 
       <arg value="C:/Ram/Ram.bat"/> 
    </ exec> 


. Bat file content is: 

java-classpath "C: \ Program Files \ Java \ jdk1.6.0_33 \ bin"-jar C: \ Ram \ ActualizacionRAM.jar Artefacto_001.ear 1.1.0 D: \ RTC \ Workspaces \ PRS_MDW_Persistencia \ Persistence \ persistenciaEar \ target ATT00002 . txt Build 
exit 

Configuration that I need to run the application ActualizacionRAM with the same settings in my build defintion JVM (Java Home = C: \ Program Files \ Java \ jdk1.6.0_33) 

Thanks and regards.

Comments
sam detweiler commented Jul 08 '14, 10:42 p.m.

Usually that error means the class was compiled with a later level java compiler than the runtime trying to execute it. 

4 answers



permanent link
Ary Zhang (2324) | answered Jul 08 '14, 10:51 p.m.
JAZZ DEVELOPER
Please check if your javac is 7.0 but jre is 6.0. You have to make them consistent or jvm version should always later than the compliler version. 

permanent link
Ary Zhang (2324) | answered Jul 08 '14, 11:01 p.m.
JAZZ DEVELOPER
 sorry, maybe your javac is 6.0 but the jvm is 5.0

permanent link
Lilian Galicia (625) | answered Jul 09 '14, 10:41 a.m.
Hi there 

I've checked java settings in my server engine constructs the following finding: 

environment variables: 
JAVA_HOME = C: \ Program Files \ Java \ jdk1.6.0_33 
JRE_HOME = C: \ Program Files \ Java \ jre6 

Build path of the application "ActualizacionRAM" 
jdk1.6.0_33 

Variable JVM Build Definition: 
Java Home = C: \ Program Files \ Java \ jdk1.6.0_33 

Is there any other place where need to review the version of the JVM? 

Thanks and regards

Comments
sam detweiler commented Jul 09 '14, 11:46 a.m.

but you execute a Run task.. in that batch file dump the environment to see what the path is set to


permanent link
Lilian Galicia (625) | answered Jul 11 '14, 12:03 p.m.
Thansk for your answers

For the successful execution of the java application was necessary to specify the version of the JVM as a runtime parameter of Build Engine. 

Regards.

Your answer


Register or to post your answer.