搜尋

首頁  >  問答  >  主體

java - 設定tomcat免安裝版,無法啟動 回傳錯誤碼4

jdk是前兩年就裝了的,所以今天直接裝了tomcat,然後在「電腦管理>服務和應用程式>服務」彈出下面提示:

我查了別問出現跟我類似的問題但是他們是錯誤類型跟我不一樣,新手不知道如何解決,求大佬幫忙。
java版本:

$ java -version
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) Client VM (build 20.13-b02, mixed mode)

以下是啟動日誌
commons-daemon.log:

[2017-06-09 00:08:46] [info]  [ 9900] Commons Daemon procrun (1.0.15.0 32-bit) started
[2017-06-09 00:08:46] [info]  [ 9900] Service Tomcat9 name Apache Tomcat 9.0 Tomcat9
[2017-06-09 00:08:49] [info]  [ 9900] Service 'Tomcat9' installed
[2017-06-09 00:08:49] [info]  [ 9900] Commons Daemon procrun finished
[2017-06-09 00:10:01] [info]  [ 7308] Commons Daemon procrun (1.0.15.0 32-bit) started
[2017-06-09 00:10:02] [info]  [ 7308] Running 'Tomcat9' Service...
[2017-06-09 00:10:02] [info]  [ 6148] Starting service...
[2017-06-09 00:10:03] [error] [ 7920] FindClass org/apache/catalina/startup/Bootstrap failed
[2017-06-09 00:10:03] [error] [ 6148] Failed to start Java
[2017-06-09 00:10:03] [error] [ 6148] ServiceStart returned 4
[2017-06-09 00:10:03] [info]  [ 7308] Run service finished.
[2017-06-09 00:10:04] [info]  [ 7308] Commons Daemon procrun finished

tomcat9-stderr.log:


2017-06-09 00:37:41 Commons Daemon procrun stderr initialized
java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.accessrrreee0(URLClassLoader.java:58)
    at java.net.URLClassLoader.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Exception in thread "main" 
扔个三星炸死你扔个三星炸死你2732 天前1072

全部回覆(2)我來回復

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-12 09:23:32

    Unsupported major.minor version 52.0

    不支援這個版本

    Tomcat9 文件寫道:

    The installer uses the registry to determine the base path of a Java 7 or later JRE, including the JRE installed as part of the full JDK

    Java7 以上。

    回覆
    0
  • 天蓬老师

    天蓬老师2017-06-12 09:23:32

    裝個新版的JDK吧

    回覆
    0
  • 取消回覆