- no JDK found - please set JAVA_HOME
#Java Environment Variable
JAVA_HOME=/usr/lib/jvm/jdk1.7.0/
export JAVA_HOME
JRE_HOME=/usr/lib/jvm/jdk1.7.0/jre
export JRE_HOME
PATH=$PATH:$JAVA_HOME:$JRE_HOME
export PATH
Now, normally, after reopening the terminal and issuing " sudo service tomcat7 start" should start the tomcat. But if you see the error above again:
- no JDK found - please set JAVA_HOME
Just to this:
"gksudo gedit /etc/default/tomcat7"
and uncomment the line that sets the JAVA_HOME variable:
Now run the tomcat. This should do the trick.
本文介绍如何解决在Ubuntu系统中启动Tomcat7时遇到的'no JDK found-please set JAVA_HOME'错误。通过设置JAVA_HOME环境变量并修改tomcat启动配置,确保正确指向JDK安装位置。

1819

被折叠的 条评论
为什么被折叠?



