Reputation: 8418
I have a java application that I can't run on a Debian Server (it runs locally). This is the reason:
Exception in thread "main" java.lang.UnsupportedClassVersionError: TimeSeriesEntry : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
Then I checked the version and I got this:
java -version
java version "1.6.0_31"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (6b31-1.13.3-1~deb7u1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
If it is a version problem, how can I update to the newest version?
This is the server I am running it:
# uname -a
Linux iWidgetServer1 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux
PS: Jar was created with Eclipse (Export -> Runnable Jar) in a Linux Mint 14 (64 bit)
Upvotes: 0
Views: 561
Reputation: 1509
What version of JDK did you build the jar with and what version are you trying to run it on.
I believe you compiled and built with JDK 7 and then are trying to run on JDK 6
Upvotes: 1