Solved

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

Posted on 2004-09-28
19
895 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

756 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