tags:

views:

62

answers:

4

I have some code compiled in jdk1.6.0_16 but when I try to run it on a different machine it says application requires JRE 1.5.0_08 - 1.5.0_11

What can be the issue??

A: 

There might be a jre1.5 installed on that other machine. jre1.5 can't run classes compiled for Java 6.

Andreas_D
A: 

Does the target machine you are running have the JRE installed?

Have you checked the actual version on the target machine...

Go to the command prompt in windows and type java -version

you may need to reinstall the JRE on the target machine.

david99world
A: 

The error message is not as goofy as it sounds: It's quite possible to compile code with a 1.6 compiler but specifying a lower level of runtime compatibility.

Still, usually most code will run on a later JVM. Could it be that your code has a specific test for the runtime version built in? Or could it be that your "different machine" has an even earlier JVM? Run java -version there to find out!

Carl Smotricz
A: 

turns out we had launch4j which had following entries:

 <path>../shared/jre/</path>
        <minVersion>1.5.0_08</minVersion>
        <maxVersion>1.5.0_11</maxVersion>
learn_plsql