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

RTC Build Definition running a Java Application error

 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.

0 votes

Comments

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
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. 

0 votes


Permanent link
 sorry, maybe your javac is 6.0 but the jvm is 5.0

0 votes


Permanent link
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

0 votes

Comments

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


Permanent link
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.

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
× 10,926

Question asked: Jul 08 '14, 8:18 p.m.

Question was seen: 5,584 times

Last updated: Jul 11 '14, 12:03 p.m.

Confirmation Cancel Confirm