| Author |
Compiling java file with JRE 1.5.0_22, but the output class shows version 1.6 : 50.0, super bit ?
|
Amandeep Singh
Ranch Hand
Joined: Jul 17, 2008
Posts: 837
|
|
Hello,
I'm surprised to find out in eclipse where setup library is JRE 1.5.0_22, but the output compiled class shows version version 1.6 : 50.0, super bit? . Any clue?
Now if I run the class with JRE 1.5.0_22, it will give me error obviously-
java.lang.UnsupportedClassVersionError: Bad version number in .class file
Thanks
|
SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12921
|
|
You're not compiling anything with JRE 1.5.0_22 - the JRE doesn't contain a Java compiler. You need a JDK for compiling Java source code.
And Eclipse doesn't even use the Java compiler from the JDK; it has its own built-in Java compiler.
Somewhere in your project configuration you should be able to specify what version the produced class files should be compatible with. Have a look at your project configuration.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Amandeep Singh
Ranch Hand
Joined: Jul 17, 2008
Posts: 837
|
|
thanks
back to basics
I did changed the configuration here-
|
 |
 |
|
|
subject: Compiling java file with JRE 1.5.0_22, but the output class shows version 1.6 : 50.0, super bit ?
|
|
|