Source not found for file I opened

For some reason, when I debug a specific class that I am editing, Eclipse opens a new tab for that class, saying "Source not found." Meanwhile, methods in the call stack from other classes work fine. In addition, when I return to the correct tab with my source, I can use mouse variables and see their values. But every time I step, it appears on the tab "Source not found". What should i try?
Source not found screenshot http://i52.tinypic.com/15dats2.png

Change Doh! I just needed to add this project to the original search path. This was a new project that was not in the original search path (while his dependency project was).

+4
source share
2 answers

The reason for this is usually that the class path used to start the debugging session does not include the project itself (and therefore does not include the project source). Most likely, it includes the generated .class project files explicitly, which is almost never what you want.

  • Check the route class settings of the startup settings that you use to start the debugging application.

  • Go to the Package Explorer, right-click on your project and select "Properties". In the new dialog box, you select "Java Build Path" and register "Libraries" there. Each lib tree has a node called a "source attachment" that indicates where the source files are.

+2
source

This means that your runtime configuration includes the class in question in the jar file as a library dependency, and not as a project dependency. Since the jar does not contain the source, so you get an error.

You don’t know what configuration you have or what tools you use, but just adding the project to the build path, as the dependency will probably solve your problem.

+2
source

All Articles