File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes UnsupportedClassVersionError ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "UnsupportedClassVersionError ??" Watch "UnsupportedClassVersionError ??" New topic

UnsupportedClassVersionError ??

Deepak Chopra
Ranch Hand

Joined: Jul 23, 2007
Posts: 433

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 Source)
at Source)
at$100(Unknown Source)
at$ Source)
at Method)
at 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)


Thanks and Regards,
SCJP 1.5 (90%), SCWCD 1.5 (85%), The Jovial Java, java.util.concurrent tutorial
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2851

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

|Asking Good Questions|
Stevi Deter
Ranch Hand

Joined: Mar 22, 2008
Posts: 265


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.

There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

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.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
pawni jain

Joined: Apr 10, 2008
Posts: 22

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.

Deepak Chopra
Ranch Hand

Joined: Jul 23, 2007
Posts: 433

All right, thanks a lot to all.

I will do it now..!
I agree. Here's the link:
subject: UnsupportedClassVersionError ??
It's not a secret anymore!