Note that there are some explanatory texts on larger screens.

plurals
  1. POJava error: Bad version number in .class file error
    primarykey
    data
    text
    <p>I've seen other questions relating to this exact error, but they don't seem to help at all.</p> <p>I'm coding an app to run on a Linux system (CentOS if I'm not mistaken), which has Java 1.5 version. I am currently editing the program on my Eclipse IDE on my Mac OSX system which has Java 1.6.</p> <p>I compiled the project into a runnable .JAR file. When prompted with the option of what to do with the libraries in Eclipse, I choose "extract selected packages into .JAR file".</p> <p>I know Eclipse has its own compiler, so in the project settings I changed the target compiler to Java 1.5 and rebuilt. And then repackaged the runnable jar file.</p> <p>However, when running the .JAR file with "java -jar file.jar" on the target machine, I still get the aforementioned "Bad version number" error.</p> <p>Can somebody help?</p> <p>Full error is:</p> <pre><code>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) </code></pre> <p>I am using only using one external library, sun-javamail.</p> <p>Thank you</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload