When you try to debug java code in eclipse, if you get “Source not found.” error with red letters. Here is the solution:
Down Arrow Icon Next to Debug Icon > Debug Configurations > Classpath Tab > Add Projects to User Entries
Add your project that cannot debug to this location.
Java Debug Problem “Source not found.” May 23, 2011
Choosing a JDK instead of JRE for the runtime environment worked for me!
NOTE:Make sure you have a JDK installed and not only JRE before proceeding.
#1. Remove the current system JRE library:
Right Click project -> properties -> Libraries -> Remove current JRE Library.
#2. Add other installed library to your project:
In the current dialogue box, click “add library”. by default JRE system library is selected, if not, select it and click next. now select “Alternate JRE” and click “Installed JRE”. In the new dialogue box, click search and provide the path to your installed Java environments.
Select an installed JDK, and click OK. Click FINISH and again OK to proceed.
@abhinav. Thanks Dear….. Its working for me…… thanks for the post