One can see that the JDK environment is problematic, but the JDK used so long has been well-configured, how one to Tomcat on the so sentimental.
Finally the solution, originally my JDK was downloaded directly from the official website, although I modified the java_home, but not too smart Tomcat still does not automatically identify the java_home path.
Linux Workarounds:
Edit the file/usr/local/tomcat/bin/catalina.sh (modified according to your own JDK path) at the beginning of the body of the file, that is, before the official code, about 99 lines to add the following code
1 |
export JAVA_HOME= /usr/local/jdk |
2 |
export JRE_HOME= /usr/local/jdk/jre |
After the change, it's probably like this.
View Source
01 |
# $Id: catalina.sh 1202062 2011-11-15 06:50:02Z mturk $ |
02 |
# ----------------------------------------------------------------------------- |
04 |
export JAVA_HOME= /usr/local/jdk |
05 |
export JRE_HOME= /usr/local/jdk/jre |
07 |
# OS specific support. $var _must_ be set to either true or false. |
12 |
CYGWIN*) cygwin= true ;; |
13 |
Darwin*) darwin= true ;; |
15 |
esac ..................... |
Note: Under Windows, modify the corresponding Catalina.bat
http://blog.csdn.net/zhangpengyu321/article/details/12144497
To configure the Tomcat reference:
http://blog.csdn.net/ithomer/article/details/7827045
Tomcat Neither the Java_home nor the JRE_HOME environment variable is defined