0
我在Ubuntu桌面上安裝了Tomcat服務器,當我運行它時,它說Tomcat已經開始,但我不能瀏覽界面,所以我做了一些研究,並在logs/catalina.out
文件中發現了一個問題:Tomcat沒有運行,「eval:/ usr/lib/jvm/java-8 -openjdk/bin/java:not found」
/home/user/Programs/apache-tomcat-8.0.26/bin/catalina.sh: 1: eval: /usr/lib/jvm/java-8-openjdk/bin/java: not found
./bin/catalina.sh: 1: eval: /usr/lib/jvm/java-8-openjdk/bin/java: not found
我甚至不具備java-8-openjdk
文件中jvm
目錄中,唯一的東西它包含的是:
lrwxrwxrwx 1 root root 24 22 2014 default-java -> java-1.7.0-openjdk-amd64
lrwxrwxrwx 1 root root 20 16 16:06 java-1.7.0-openjdk-amd64 -> java-7-openjdk-amd64
drwxr-xr-x 5 root root 4096 24 14:52 java-6-openjdk-amd64
drwxr-xr-x 7 root root 4096 2 20:58 java-7-openjdk-amd64
drwxr-xr-x 8 root root 4096 24 16:38 java-8-oracle
我檢查了環境變量,他們l OK。問題是什麼?
編輯:
正如我注意到Tomcat使用JRE_HOME代替JAVA_HOME,而不是一個事實,即它是否設置正確,怎麼改?
Using CATALINA_BASE: /home/shota/Programs/apache-tomcat-8.0.26
Using CATALINA_HOME: /home/shota/Programs/apache-tomcat-8.0.26
Using CATALINA_TMPDIR: /home/shota/Programs/apache-tomcat-8.0.26/temp
Using JRE_HOME: /usr/lib/jvm/java-8-openjdk
Using CLASSPATH: /home/shota/Programs/apache-tomcat-8.0.26/bin/bootstrap.jar:/home/shota/Programs/apache-tomcat-8.0.26/bin/tomcat-juli.jar
Using CATALINA_PID: /home/shota/Programs/apache-tomcat-8.0.26/tomcat.pid
Existing PID file found during start.
Removing/clearing stale PID file.
Tomcat started.
聽起來就像你用Ubuntu已知的JVM手動修改過的。 –
請問您可以發佈「JAVA_HOME」的值嗎?嘗試使用[export JAVA_HOME =/usr/lib/jvm/java-8-oracle /] – cody123
這是echo $ JAVA_HOME:/ usr/lib/jvm/java-8-oracle – Shota