LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Exception in thread "main" java.lang.UnsupportedClassVersionError (https://www.linuxquestions.org/questions/programming-9/exception-in-thread-main-java-lang-unsupportedclassversionerror-521033/)

manolakis 01-19-2007 08:45 PM

Exception in thread "main" java.lang.UnsupportedClassVersionError
 
Hey there
Is anybody familiar with the following?

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number 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:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

The case is that I have successfullly compiled the java file but at run-time i get the above.

Thanks for your time

jlliagre 01-20-2007 02:44 AM

Yes, you are mixing classes compiled to run under a recent JVM (eg. 5 or 6) with older code, running under an older JVM.

Use the latest JVM to run the whole thing.

manolakis 01-20-2007 10:56 AM

Hi again
Many thanks for your reply
I just want to ask one thing. How can I set the computer to run the latest JVM
Do I have to unistall the older version? I would like to apologize because i am quite newbie to Linux. I really appreciate your help

Thanks for your time
Manolakis


All times are GMT -5. The time now is 08:39 AM.