I’ve seen other questions relating to this exact error, but they don’t seem to help at all.
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.
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”.
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.
However, when running the .JAR file with “java -jar file.jar” on the target machine, I still get the aforementioned “Bad version number” error.
Can somebody help?
Full error is:
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)
I am using only using one external library, sun-javamail.
Thank you
You either: