Java tomcat启动失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23081395/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Start of tomcat failed
提问by Code Hunter
I am facing issue to start my tomcat server in netbeans. I am getting error when I click on start button
我在 netbeans 中启动我的 tomcat 服务器时遇到问题。单击开始按钮时出现错误
"Starting of tomact failed, check whether the /Application/NetBeans/apache-tomcat-7.0.52/bin/catalina/sh and related scripts are executable."
For more details please check screenshot
更多详情请查看截图
采纳答案by David Brossard
You should run from the command line / shell if you can though I realize you want to run from Netbeans in this case.
如果可以,您应该从命令行/shell 运行,尽管我意识到在这种情况下您想从 Netbeans 运行。
Also make sure that all your .sh
scripts are executable (do a chmod
) because otherwise they cannot be called.
还要确保您的所有.sh
脚本都是可执行的(执行 a chmod
),否则无法调用它们。
Lastly, make sure you have the right permissions to run the scripts.
最后,确保您具有运行脚本的正确权限。
Once you are beyond these checks, you'll possibly get other error messages e.g. your JAVA_HOME
or your CATALINA_HOME
are not set. These will be easy to fix.
一旦超出这些检查范围,您可能会收到其他错误消息,例如您的JAVA_HOME
或您CATALINA_HOME
的未设置。这些将很容易修复。
EDIT
编辑
To run Tomcat from the terminal,
要从终端运行 Tomcat,
- go to your Tomcat folder (either
TOMCAT_HOME
orTOMCAT_HOME/bin
). - Make sure all
.sh
scripts are executable (chmod a+x *.sh
) - run
startup.sh
: ./startup.sh
orbin/startup.sh
(depending on whether you are insideTOMCAT_HOME
or insideTOMCAT_HOME/bin
)
- 转到您的 Tomcat 文件夹(
TOMCAT_HOME
或TOMCAT_HOME/bin
)。 - 确保所有
.sh
脚本都是可执行的 (chmod a+x *.sh
) - 跑
startup.sh
:。/startup.sh
或bin/startup.sh
(取决于你是在里面TOMCAT_HOME
还是在里面TOMCAT_HOME/bin
)
回答by Sandy
You can make catalina.sh
runnable by executing following command in terminal
您可以catalina.sh
通过在终端中执行以下命令来使可运行
chmod 755 <your tomcat location>/bin/catalina.sh