简体   繁体   English

无法在Debian服务器中运行jar文件

[英]Can't run jar file in a Debian Server

I have a java application that I can't run on a Debian Server (it runs locally). 我有一个无法在Debian Server上运行的Java应用程序(它在本地运行)。 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) PS:Jar是在Linux Mint 14(64位)中使用Eclipse(导出-> Runnable Jar)创建的

What version of JDK did you build the jar with and what version are you trying to run it on. 您使用哪个版本的JDK构建jar,以及尝试在哪个版本上运行它。

I believe you compiled and built with JDK 7 and then are trying to run on JDK 6 我相信您使用JDK 7进行了编译和构建,然后尝试在JDK 6上运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM