简体   繁体   English

tomcat 8 in Eclipse Luna 启动失败:目录 [C:\Program Files\Eclipse\eclipse\lib] 出错

[英]tomcat 8 in Eclipse Luna failed to start : Error with directory [C:\Program Files\Eclipse\eclipse\lib]

I need your help.我需要你的帮助。

I'm new on eclipse. (I have been used Intellij until now)I installed java,tomcat,maven and finished all integrations and configurations.我是 eclipse 的新手。(到目前为止我一直使用 Intellij)我安装了 java,tomcat,maven 并完成了所有集成和配置。

I created maven project on Eclipse Luna but when I want to debug I get an this error message.我在 Eclipse Luna 上创建了 maven 项目,但是当我想调试时,我收到一条错误消息。

WARNING: Problem with directory [C:\Program Files\Eclipse\eclipse\lib],
exists: [false], isDirectory: [false], canRead:[false]
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina 
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:266)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:465)

Do you know How can I fix this?你知道我该如何解决这个问题吗? Thanks.谢谢。

You need to configure your project as a Dynamic web project or if the project is already created add the faced to it by doing: 您需要将您的项目配置为动态Web项目,或者如果已经创建了该项目,则可以通过以下操作将其添加到项目中:

Right-click the project --> Properties --> Project Facets --> check the Dynamic Web Module facet --> OK. 右键单击项目->属性->项目构面->检查动态Web模块构面->确定。

I had that same problem and here's how I solved it.我遇到了同样的问题,这就是我解决它的方法。

I went to "Run -> Run Configurations" and selected the problematic server under "Apache Tomcat".我转到“运行 -> 运行配置”并在“Apache Tomcat”下选择有问题的服务器。 After that, I selected the "Arguments" tab and changed the working directory from the default to where I had Tomcat installed (for me it was in an opt dir)之后,我选择了“Arguments”选项卡并将工作目录从默认更改为我安装了 Tomcat 的位置(对我来说它在一个 opt 目录中)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM