File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply 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: 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
    
    3

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-

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Compiling java file with JRE 1.5.0_22, but the output class shows version 1.6 : 50.0, super bit ?
 
Similar Threads
class file has wrong version 50.0, should be 49.0
Java -Version Problem
Need help decompiling version 50 class files
How to find which version of java was used to compile particular java class.
Unsupported major.minor version 50.0