Charles Everhart

Greenhorn
+ Follow
since Jul 25, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Charles Everhart

Howdy Y'all

New to Java, just picked up the Head first Java 2nd edition and have been playing with the code.

I have downloaded jdk1.6 and have on my computer the following path.
"C:\Program Files\Java\jdk1.6.0_07\bin"

If I enter "java -version" I get the following return value
'java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)'

I can enter my code into a .java file in the "bin" folder, compile and run it and it works.

Here is my issue, if I try to run my program in a seperate folder (I added a folder "C:\Program Files\Java\jdk1.6.0_07\bin\Samples" to store programs in) I get a "(Unsupported major.minor version 50.0)" error. I researched the error and found it was because my versions didn't match.

I did a 'java -version" in my "C:\Program Files\Java\jdk1.6.0_07\bin\Samples" and it returned:
'java version "1.3.1_01"
Java(TM) SE Runtime Environment (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)'

Why did the "C:\Program Files\Java\jdk1.6.0_07\bin\Samples" and the
"C:\Program Files\Java\jdk1.6.0_07\bin" return different versions?

I also looked at the "C:\Program Files\Java\jdk1.6.0_07\sample" and it also returned a 1.3.1_01 version.

Also, is it possible to change the 1.3 version to a 1.6 version....and how.



Thanks so much for your help
12 years ago