MyEclipse8中配置Tomcat7出错

MyEclipse8中配置Tomcat7出错

问题描述:

(毕业后一年多没有搞JAVA了,现在都很生疏,前不久买了本本了,现在想继续走JAVA开发这个方向,因为个人对这行非常爱好;并打算抓紧时间学习,争取在过年后,找一份JAVA开发相关工作,我相信自己的执著一定能成功的。但现在很迷茫,不知道怎么入手了,平时有时间就下载PDF书籍看,很希望能有一位老师指点迷津,感谢)

 

以下是问题:

 

开始我用MyEclipse8+tomcat6(安装版)配置启动正常,但后来我下载到tomcat7(压缩版),配置MyEclipse8时,就出现错误问题了。

 

Could not find the main class

org.apache.catalina.startup.Bootstrap.Program will exit.

 

详情见附件图片

(因为刚刚进入论坛,操作很笨拙,还请谅解!)

我终于知道了!

我去国外的网站 看了半天 找到真理了!

[quote]

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.(Bootstrap.java:54)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
… 1 more
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit.

Solutions
1. In Eclipse, Open the “Server” tab.
2. Double click on the “Tomcat6″ entry to see the configuration.
3. Then click on the “Open launch configuration” link in the “General information” block.
4. In the dialog, select the “Classpath” tab.
5. Click the “Add external jar” button.
6. Select the file “/usr/share/tomcat6/bin/tomcat-juli.jar”
7. Close the dialog.
8. Start tomcat 6 from Eclipse.

[/quote]

这个好像是tomcat7的问题,你上网看看tomcat的版本,有个版本好像解决这个问题了。

[quote]org.apache.catalina.startup.Bootstrap.Program will exit.[/quote]

没配置 jdk 或者 环境变量 没配吧!

是tomcat的bin目录下缺少 bootstrap.jar 这个jar包,可以在别人那拷一个或者重装个新的tomcat就可以了。

呵呵! 我本地测试了!

bootstrap.jar 这个jar包, 你找下有嘛?

很想帮你! ... 帮你顶.一.下!

commons-logging.jar 这个是否有个!

还有个想法是 吧 tomcat6 的 LIB 复制进去呀!

1.In Eclipse, Open the "Server" tab.

2.Double click on the "Tomcat6" entry to see the configuration.

3.Then click on the "Open launch configuration" link in the "General
information" block.

4.In the dialog, select the "Classpath" tab.

5.Click the "Add external jar" button.

6.Select the file "/usr/share/tomcat6/bin/tomcat-juli.jar"

7.Close the dialog.

8.Start tomcat 6 from Eclipse.

1.0 window ---myeclipse

2.0 server---Tomcat6

3.0 launch ---create launch configuration

4.0 ---Classpath

呵呵 我 QQ 252821719