File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java.lang.UnsupportedClassVersionError: test (Unsupported major.minor version 50.0)

 
shiva valanukonda
Greenhorn
Posts: 26
Hibernate jQuery Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have changed my PC recently. so i have installed all the softwares mentioned below.

Java 1.6
Tomcat 6

After that i installed Oracle 10g.

I have set the class path properly like the below.
PATH : C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;.
CLASS PATH : C:\Program Files\Java\jre1.6.0\lib\rt.jar;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib;C:\oracle\product\10.1.0\Db_1\jdbc\lib\classes12.jar;E:\hibernateJAR\antlr-2.7.6.jar;E:\hibernateJAR\asm.jar;E:\hibernateJAR\cglib-2.1.3.jar;E:\hibernateJAR\commons-collections-2.1.1.jar;E:\hibernateJAR\commons-logging-1.0.4.jar;E:\hibernateJAR\dom4j-1.6.1.jar;E:\hibernateJAR\hibernate3.jar;E:\hibernateJAR\jta.jar;E:\hibernateJAR\log4j-1.2.11.jar;.;


I am getting the below error when i run my test program:

C:\Documents and Settings\shiva\Desktop>java test
Exception in thread "main" java.lang.UnsupportedClassVersionError: test (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

And my system pointing to Java 1.4 version when i run the java -version on command prompt

C:\Documents and Settings\shiva\Desktop>java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)


Please help me ..

Thanks



 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like your 1.6 Java is not getting picked up.

I would find out exactly where it's picking up java.exe from.

Your PATH example is very short, I would expect to see c:\windows etc.. in there.
I'll bet if you show and follow the Windows path you'll find the old 1.4 executable.

WP
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To explain the error message to you, version 50 refers to java 6. Your machine is expecting class version 48 i.e java 1.4.
 
shiva valanukonda
Greenhorn
Posts: 26
Hibernate jQuery Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William P O'Sullivan,

Could you please let me know what exactly you are referring in PATH.
Some thing like c:\windows etc.. you are expecting ?
what is the default one for Win XP SP3.

Thanks for the reply...


And one more issue is , when i was trying to open Eclipse Version: Indigo Service Release 2, i have got one error saying Java run time error.
I have uninstalled the Oracle 10g now. I started eclipse it is working fine.

So, there might be problem with Oracle ..
Could you please suggest which version of Oracle will be best one.
 
Wei Dai
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>Java.lang.UnsupportedClassVersionError: test (Unsupported major.minor version 50.0)
>I have set the class path properly like the below.
PATH : C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;.
CLASS PATH : C:\Program Files\Java\jre1.6.0\lib\rt
>And my system pointing to Java 1.4 version when i run the java -version on command prompt
Your setting command should be wrong. If you use set in command console, you will find path point to java 1.4
You can try
SET PATH=C:\Program Files\Java\jdk1.6.0\bin;%PATH%
SET CLASSESPATH=C:\Program Files\Java\jre1.6.0\lib\rt;%CLASSESPATH%

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic