找不到或加载main class org.apache.catalina.startup.Bootstrap [英] Could not find or load main class org.apache.catalina.startup.Bootstrap

查看:2233
本文介绍了找不到或加载main class org.apache.catalina.startup.Bootstrap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Eclipse中运行apache tomcat7.0.56时,我收到错误

When I run apache tomcat7.0.56 in Eclipse, I get an error


错误:找不到或加载主class org.apache.catalina.startup.Bootstrap

如何解决问题?

推荐答案

首先你应该尝试使用它自己的.bat而不是Eclipse来运行TOMCAT。如果不运行问题将在您的tomcat安装中,而不是在Eclipse中,您可以查看TOMCAT_HOME / logs /的文件,其中跟踪Tomcat的错误(它们非常有用)。

First of all you should try to run TOMCAT using it's own .bat and not Eclipse. If it doesn't run problems would be on your tomcat installation and not in Eclipse and you could take a look to the files of TOMCAT_HOME/logs/ where Tomcat's errors are traced (they are so helpful).

无论如何,如果它从eclipse正常运行,尝试删除eclipse的tomcat配置,并从这些简单的步骤开始设置

Anyway, if it runs properly out of eclipse, try to delete the eclipse's tomcat configuration and set it from the beginning following these simple steps


  • 转到Eclipse的窗口>首选项>服务器>运行时环境
    添加浏览TOMCAT_HOME的Tomcat服务器,并选择
    合适的JRE(使用JAVA_HOME包含jre)请注意
    根据TOMCAT版本
    (TOMCAT_8至少需要JDK_1.7版本,需要一定JDK的邮件),如果未设置,通常
    显示错误解释它开始)

  • 转到Eclipse的窗口>显示视图>其他...>服务器>服务器,并添加一个新的
    服务器;在这种情况下,您之前设置的TOMCAT版本。你不要
    需要添加进一步的配置,使TOMCAT启动。

  • 此时如果没有任何应用程序
    TOMCAT_HOME webapps文件夹,但那些默认(你必须
    空TOMCAT_HOME /工作文件夹删除缓存的东西)。一旦你有
    确保它,从ECLIPSE和交叉手指开始。如果失败,请查看Eclipse的控制台,并查找在此信息中复制的异常

  • Go to Eclipse's Window > Preferences > Server > Runtime Environment and add a Tomcat Server browsing your TOMCAT_HOME and selecting the suitable JRE (use JAVA_HOME that contains jre yet) paying attention to messages requiring a certain JDK depending on the TOMCAT version (TOMCAT_8 requires at least JDK_1.7 version and, if not set, usually shows errors explaining it when starting)
  • Go to Eclipse's Window > Show View > Other... > Server > Servers and add a new server; in this case the version of TOMCAT you set before. You don't need to add further configuration to make TOMCAT to start.
  • At this point if would be helpful if you hadn't any app at TOMCAT_HOME's webapps folder but those that came default (you must empty TOMCAT_HOME/work folder to remove cached stuff). Once you have ensured it, start from ECLIPSE and cross fingers. In case of fail, take a look to Eclipse's console and look for the exception to copy at this post

这篇关于找不到或加载main class org.apache.catalina.startup.Bootstrap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆