Hello,

I am trying to execute a jar file with higher version of jdk. But it fails & the worst part is I am not getting any error message.

Jar file compiled verison: jdk 1.5
Executed version: jdk 1.7

I assume the jar file is downward compatible. thoughts pls?

Thanks!
Om

Recommended Answers

if you get no error message, how do you know it fails? it might just as well have reached a conditional statement and based on that don't run.
or, you didn't set your classpath right, and your OS doesn't know what to do with your .jar file.

Jump to Post

In general a jar will run on any higher jre version. It's possible you may run foul of tighter security settings, as there have been a number of changes there since 1.5.
How exectly does it "fail"? - absolutely nothing happens - runs but wrong results etc?
Did you try …

Jump to Post

All 3 Replies

Re: Jar file created in JDK 1.5 - Not executing in JDK 1.7 - is this normal? 80 80

if you get no error message, how do you know it fails? it might just as well have reached a conditional statement and based on that don't run.
or, you didn't set your classpath right, and your OS doesn't know what to do with your .jar file.

Re: Jar file created in JDK 1.5 - Not executing in JDK 1.7 - is this normal? 80 80

In general a jar will run on any higher jre version. It's possible you may run foul of tighter security settings, as there have been a number of changes there since 1.5.
How exectly does it "fail"? - absolutely nothing happens - runs but wrong results etc?
Did you try running the jar with java.exe (as opposed to the normal javaw.exe) so you can see the console output?

Re: Jar file created in JDK 1.5 - Not executing in JDK 1.7 - is this normal? 80 80

I did not see any java process when I tried to execute the jar.

The issue is fixed now. I have removed the CLASSPATH variable, removed the previously instaaled jdk from Server & installed latest jdk version,set CLASSPATH.

Jar file now runs as expected[I'm seeing expected results]. Thanks stultuske & James for super fast response..

I'm marking this question as "Solved"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.