.class file opens instead of .java while debugging

Viewed 53499

Current setup:

  • MainProject which is a Library Project

  • BranchProject which is a new projects and has MainProject as a Reference

Whenever I debug and a file from MainProject is on focus (actually BranchProject has only graphic and xml layout changes) the Debug window opens a .class file which is read only. I want it to open the .java file so I can edit it directly.

9 Answers

If you tried all above hints and it still doesn't work try this solution, it worked form me:

  1. Right-click on the Project in the Package-Explorer, click Build Path -> Configure Build Path...
  2. Select tab Order and Export
  3. select library that you can't reach code and then click on button Bottom
  4. Then click on Apply and Close

hope this can help you

Most of the time it happens when specific source folder are not added in build path Sources tab.

Right-click on the Project in the Package-Explorer, click Build Path -> Configure Build Path -> Source Tab

Add the source folder if your project source folder is not there. Select Add folder -> select your project source folder specifically. Eg: project_name/src . Then Apply it and restart server.

Related