Facing Error in Swings

Hi,

I am using NetBeans IDE 5.5. I created a sample Swing application.

When i try to run the application i am facng the below error in the comand prompt:

Command given: java -jar <jarname>.jar

Error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n
umber in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)

Please someone help me in this..

Thanks...
 
This usually means that your application has been compiled with a newer

version of JDK than the version you try to run it with. For example,

the source code is compiled with JDK 1.4 but executed with JRE 1.3. JRE 1.3

does not understand the new format of .class files generated by

compiler from JDK 1.4 so you get the error message.

I think this should not happen unless you downgrade your JDK/JRE or

change the Source Level setting in the project's properties.

Follow these links: Might solve your problems:-

https://answers.launchpad.net/ubuntu/+question/7917

java.lang.UnsupportedClassVersionError / Unsupported major.minor version 49.0

I caught "java.lang.UnsupportedClassVersionError", help me

Regards,

G.
 
Back
Top