Eclipse3.0+lomboz3.01+tomcat5.027安装调式问题小结

类别:Java 点击:0 评论:0 推荐:

1.如何安装Eclipse3.0+lomboz3.01+tomcat5.027?

答:参见以下文章

1) 使用Eclipse3.0+lomboz3.0+jboss3.2.3开发EJB(一)

2) Eclipse 3 + Lomboz 3 + Tomcat 5 开发网站

2.安装lomboz时,按要求将所需文件解压到了plugin目录下,可是打开eclipse并没有找到相关的选项为什么?

答:

第一种方法:This is because of cached eclipse plugin/feature information. The solution is simple - Start eclipse with: eclipse -clean option

第二种方法:删除configuration/org.eclipse.update目录,重启eclipse

第三种方法:Having troubles with installing Lomboz 3.0? Just follow the steps below:

1. Remove your Eclipse folder completely
2. Unzip Eclipse
3. Do not run Eclipse at this stage!!!!
4. Unzip EMF 2.0 runtime
5. Unzip Lomboz 3.0
6. Run Eclipse for the first time, and you will be able to configure your Lomboz 3.0

It is very important to note, after you unzip Eclipse, you can't run it after you unzip EMF and lomboz. If you have run Eclipse for the first time before you unzip EMF and lomboz, they will not appear in the 'Customize Perspective' 

3.lomboz配置完成后,启动tomcat不成功,出现Bootstrap: Class loader creation threw exception java.lang.ExceptionInInitializerError,怎么解决?

答:

I edited the file "tomcat50x.server" under
C:\eclipse\plugins\com.objectlearn.jdt.j2ee_3.0.1\servers
and changed

-Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"

to

-Djava.endorsed.dirs="${serverRootDirectory}/common/endorsed"

in the following 'tags':

<startVmParameters>-DJAVA_HOME="${jrePath}" -Dcatalina.base="${serverRootDirectory}" -Dcatalina.home="${serverRootDirectory}" -Djava.io.tmpdir="${serverRootDirectory}/temp" -Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"</startVmParameters>
and

<stopVmParameters>-DJAVA_HOME="${jrePath}" -Dcatalina.base="${serverRootDirectory}" -Dcatalina.home="${serverRootDirectory}" -Djava.io.tmpdir="${serverRootDirectory}/temp" -Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"</stopVmParameters>

This matches the value used in my catalina.bat file when lauched from the command prompt.

PS:不知道作者是怎么知道的,反正真的很好使,查了一下setclasspath.bat,里面却实是
rem Set the default -Djava.endorsed.dirs argument
set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed
而没有/bin那个,谁知道这是为什么?

4.配置成功后,tomcat能启动,我怎么调式jsp?

答:参见以下文章

1) Eclipse, Lomboz and Tomcat 的 JSP 调试

2) Debugging JSPs

PS:注意Debugging JSPs这篇文章里有一个 IMPORTANT NOTE,如下:

IMPORTANT NOTE: Lomboz only supports JSP debugging for application servers that can keep a copy of the servlet source code (.java) files in a folder that is identified as an eclipse source folder. If you can change your application servers settings to do this, you can debug your JSPs.

这个很重要,这个也就回答了为什么要把workDir设在j2src,而不是其它目录aa,bb之类,因为j2sr是默认的eclipse source folder,当然你要是非要设成别的目录,也可以,只要把workDir指向你定制的目录如workDir="webapps\test\aa",并且一定要在eclipse内将aa设成source folder!

5.调式的时候,我设了断点,然后回到ie,刷新页面,可是并不在断点处停止,怎么办?

答:手工修改_jsp.java,如空白处加个回车,然后再把回车删了,然后加断点,然后点保存,然后再去刷新页面。这样就好用了,在这之后,无论你再怎么加减断点都不用保存就能可以直接生效了!

PS:这个问题折腾了我老半天,Forge也有人问过类似的问题,可是没人回,我 开始一直怀疑是不是哪儿设置不对.....后来灵光一现,是不是加断点后的.java并没有重新编绎成.class,所以无论我怎么刷IE里的.jsp,也只是一直运行的加断点前的那个.class。所以就有了上面的解决方法;可是为什么只有第一次是这样,而第二次以后就又正常了呢?不懂!如果有其它什么办法或解释还请大家分享一下,谢谢!

嗯..先这么多了

本文地址:http://com.8s8s.com/it/it16099.htm