0
當我嘗試啓動Tomcat服務器時出現以下錯誤;誰能幫我嗎?啓動Tomcat服務器時UnsupportedClassVersionError
C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin>tomcat
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n
umber in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access+100(Unknown Source)
at java.net.URLClassLoader+1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
無法運行服務作爲控制檯應用程序
看起來像版本不匹配。你用什麼java版本? – madth3
確保您擁有最新的JDK,並且JAVA_HOME env變量指向它。通常在您的類使用更高版本的JDK進行編譯時會看到該錯誤 –