Differences between java.exe in jdk/bin and jdk/jre/bin.

What is the difference between java.exe in the jdk/bin directory, and java.exe in the jdk/jre/bin directory?. I'm using java 1.5, and I get a java.lang.UnsupportedClassVersionError with the 1st one, and with the 2nd one works ok.
LVL 3
pulupulAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
objectsConnect With a Mentor Commented:
> The case is that I have java 1.4 installed also,

it won't run 1.5 classes, thats the reason for the error

> but the path does not reference its directory

thats right, it runs it from windows directory
0
 
CEHJCommented:
You've probably got different VMS in that case

java xx\java.exe -version
0
 
CEHJCommented:
LOL i mean

xx\java.exe -version
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
objectsCommented:
should be the same, do you have another jdk/jre installed?
0
 
pulupulAuthor Commented:
Sorry forget it, there must be a problem with my path, because I get the same result if I reference java.exe with the full path.
0
 
CEHJCommented:
You'll probably find you're trying to run a 1.5 class with a 1.4 VM
0
 
pulupulAuthor Commented:
The case is that I have java 1.4 installed also, but the path does not reference its directory, I must be missing something.
0
 
CEHJCommented:
How are you starting / invoking it?
0
 
pulupulAuthor Commented:
OK i found it, there is a java.exe in \windows\system32 which is version 1.4.2 :)
0
 
objectsCommented:
(:
0
 
pulupulAuthor Commented:
I'd better definitely uninstall 1.4.2.
0
 
CEHJCommented:
pulpul

a.
>>it won't run 1.5 classes, thats the reason for the error

i already said this:

>>You'll probably find you're trying to run a 1.5 class with a 1.4 VM

and

b.

>>
> but the path does not reference its directory

thats right, it runs it from windows directory
>>

is a contradiction in terms

Please explain why you accepted that as the answer





0
 
pulupulAuthor Commented:
Sure: I didn't know why was I executing 1.4 VM instead of 1.5, because I thought that the only one that was on my path was 1.5.
Statement b, strictly speaking, is a contradiction, but the case is that I didn't know Java installed had put a java.exe in the windows directory, and objects guessed that.
0
 
CEHJCommented:
Not convinced, and FYI

>>it won't run 1.5 classes

is actually incorrect

0
 
pulupulAuthor Commented:
why?
0
 
objectsCommented:
It's not incorrect (o/wise why would u get the error), though I'm sure CEHJ will twist the semantics to make it appear wrong :)

0
 
VenabiliCommented:
objects,

I thought I had asked to stop the personal remarks... And I thought you said OK.

guys,

Want to calm down?

Venabili
Java Page Editor
0
 
CEHJCommented:
>>why?

Sorry - it was very late here when i posted that - it wasn't precise. What i meant to say is that because a class has been compiled with 1.5 doesn't mean that it won't run on a 1.4 VM as long as the target version has been set correctly.
0
 
objectsCommented:
> What i meant to say is that because a class has been compiled with 1.5 doesn't mean that it won't run on a
> 1.4 VM as long as the target version has been set correctly.

Then it would not be a 1.5 class file.
My original statement is correct.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.