Set up the Debugger with Eclipse

Preview:

DESCRIPTION

Debug Eclipse; set up;

Citation preview

Setting Up the Debugger

Copyright © 2000 - 2006 Liferay, Inc.

All Rights Reserved.No material may be reproduced electronically or in print without written

permission from Liferay, Inc.

1. Click Run Run…

1. Select Java Application tomcat. If you do not see tomcat, go to the next slide.

If you were NOT able to select tomcat,• Click Java Application• Click New Configuration

1. Name: tomcat

2. Project: ext

3. Main class: org.apache.catalina.startup.Bootstrap

1. Click the Arguments tab

2. Program arguments: start

3. VM arguments: (See Next Slide)

1. VM arguments:-Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.timezone=GMT

-Djava.security.auth.login.config=C:/Training/liferay/tomcat/conf/jaas.config

-Djava.endorsed.dirs=C:/Training/liferay/tomcat/common/endorsed

-Dcatalina.base=C:/Training/liferay/tomcat

-Dcatalina.home=C:/Training/liferay/tomcat

-Djava.io.tmpdir=C:/Training/liferay/tomcat/temp

Warning! Make sure the paths are pointing to your Tomcat directory.

If you unzipped Tomcat to a directory other than C:/Training/liferay/tomcat you must change the paths accordingly.

1. Working directory:

C:/Training/liferay/tomcat

1. Click the JRE tab

2. Make sure that the Project JRE points to the JDK. For example, j2sdk1.4.2_12.If the Project JRE points to the JRE instead of the JDK see the Troubleshooting section.

1. Click the ClassPath tab

2. Remove all entries in Bootstrap Entries except for JRE System Library [jdk]

1. Remove all entries in User Entries

2. Select User Entries, then click Add External Jars

3. Add bootstrap.jar located here:C:/Training/liferay/tomcat/bin

1. Click the Source tab

2. Click Add Java Project

3. Check ext and portal and click OKThese options may not be available if they are already included in the Source Lookup Path window.

1. Click Apply Run

Congratulations!

Congratulations, you can now debug the source code in Eclipse!

Run Tomcat (Debug)

Run Tomcat (No Debug)

Stop Tomcat

Clear all terminated launchesClick to see if more than one instance of

Tomcat is running

Clear console

Troubleshooting

If your Project JRE does not point to the JDK:

1. Click Window Preferences Java Installed JREs

2. Click Add

3. Enter a name for your JDKBrowse for the location of your JDKFor example: C:/Java/jdk1.5.0_08

4. Remove all entries that point to the JRE

Your Project JRE should now point to the SDK

Revision HistoryEdward Shin 09/08/06 Author

Recommended