Solved

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

Posted on 2004-09-28
19
864 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
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…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

863 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

25 Experts available now in Live!

Get 1:1 Help Now