This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Compiling java file with JRE 1.5.0_22, but the output class shows version 1.6 : 50.0, super bit ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Compiling java file with JRE 1.5.0_22, but the output class shows version 1.6 : 50.0, super bit ?" Watch "Compiling java file with JRE 1.5.0_22, but the output class shows version 1.6 : 50.0, super bit ?" New topic
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: 844
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

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: 844
thanks


back to basics

I did changed the configuration here-

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiling java file with JRE 1.5.0_22, but the output class shows version 1.6 : 50.0, super bit ?
 
Similar Threads
Java -Version Problem
class file has wrong version 50.0, should be 49.0
Unsupported major.minor version 50.0
Need help decompiling version 50 class files
How to find which version of java was used to compile particular java class.