Why does the Eclipse debugger give the error “Source not found” seemingly without reason?

Eclipse doesn’t crash. You’re trying to step into a method, where eclipse doesn’t know where to find the source (*.java) files and informs you about this. Here is how to tell eclipse where to look. Go to

Window -> Preferences -> Java -> Installed JREs, select the JRE you are using and click Edit.

There, select all of the jar files in the list you see and and click Source Attachment....

In the window that shows up, select the fille src.zip, which is in your JDK folder (if you didn’t uncheck it while installing the JDK). On the machine I’m on right now, that is

C:\Program Files\Java\jdk1.7.0_07\src.zip.

Save all your changes (possibly restart eclipse) and you won’t see that error again.

Leave a Comment