For some reason Eclipse doesn't remember source lookup path for some java projects, and every time during debugging (after redeploying) I need to press "Edit source lookup path" button and add current project to the list.
Does anyone know how to make it remember selected source location?
EDIT: It is a tomcat project, built with ant. Eclipse version is 3.2.2
.classpath looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="web/WEB-INF/classes"/>
<classpathentry kind="lib" path="web/WEB-INF/lib/commons-collections-3.2.jar"/>
... bunch of libs here
</classpath>
UPDATE: I found required setting - it is under General Preferences -> Tomcat -> Source path.
Source Lookup Path A source location is a description of one (or more) source repositories. At launch time, source locations are translated (resolved) into a collection of actual source repositories.
Try looking at the Run/Debug configuration for what you are executing, and check the source tab. You can add elements manually, but that is really not recommended.
The elements in the source tab are based on the classpath of the project containing the element that you run. In the case of running tomcat, the source path simply contains all the web projects that are associated with tomcat (and their dependencies).
Solution is:
Window / Preferences
Tomcat / Source Path
Click your project name. Don't forget to change it if you cahnge to another project!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With