Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-09-28
19
Medium Priority
?
931 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn different types of Android Layout and some basics of an Android App.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

722 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