Solved

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

Posted on 2004-09-28
19
860 Views
Last Modified: 2013-11-23
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.
0
Comment
Question by:pulupul
  • 7
  • 6
  • 5
  • +1
19 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12175643
You've probably got different VMS in that case

java xx\java.exe -version
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12175648
LOL i mean

xx\java.exe -version
0
 
LVL 92

Expert Comment

by:objects
ID: 12175649
should be the same, do you have another jdk/jre installed?
0
 
LVL 3

Author Comment

by:pulupul
ID: 12175656
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 12175658
You'll probably find you're trying to run a 1.5 class with a 1.4 VM
0
 
LVL 3

Author Comment

by:pulupul
ID: 12175667
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 12175682
How are you starting / invoking it?
0
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 12175683
> 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
 
LVL 3

Author Comment

by:pulupul
ID: 12175685
OK i found it, there is a java.exe in \windows\system32 which is version 1.4.2 :)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 92

Expert Comment

by:objects
ID: 12175701
(:
0
 
LVL 3

Author Comment

by:pulupul
ID: 12175704
I'd better definitely uninstall 1.4.2.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12175718
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
 
LVL 3

Author Comment

by:pulupul
ID: 12175804
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 12175832
Not convinced, and FYI

>>it won't run 1.5 classes

is actually incorrect

0
 
LVL 3

Author Comment

by:pulupul
ID: 12175863
why?
0
 
LVL 92

Expert Comment

by:objects
ID: 12175878
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
 
LVL 20

Expert Comment

by:Venabili
ID: 12177255
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 12177790
>>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
 
LVL 92

Expert Comment

by:objects
ID: 12177798
> 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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now