Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsupportedClassVersionError ??

 
Deepak Chopra
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I am getting following exception while running a JAVA program, I dont know how to resolve this, Can any one give me some clue ?

C:\JAVA_PROG\source>java Hello1
Exception in thread "main" java.lang.UnsupportedClassVersionError: Hello1 (Unsup
ported major.minor version 49.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)

C:\JAVA_PROG\source>
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
never heard of anything like this before but from my programming experience I
think that you have compiled the Heo1 file using a different JDK version and now you are executing it on a different one.

Also I think that this isn't the right forum for this question, anyways.




Hope this helps
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sunny,

Check out this topic.

Looks like your program was compiled with javac version 1.5, and you're trying to run it with an earlier version of java.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You compiled the source with a higher version of the JDK and you are trying to run it with a lower version.

Type java -version to check which version you are using to run the program.
 
pawni jain
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

may be this will work..
upgrade your JVM.uninstall all your java,then reinstall your JDKs and JREs, working from older to newer version.
Check which version you are using with.

Thanks,
Regards
 
Deepak Chopra
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All right, thanks a lot to all.

I will do it now..!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic