This is usually due to the compiler settings in Eclipse IDE , Windows -> preferences -> Java -> Compiler -> "Add line number .. " should be checked .
Another problem can be because JRE source is not mapped to the IDE .
Another problem can be because JRE source is not mapped to the IDE .
To ensure, you have the correct src.zip, do this:
Window->Preferences->Java->Installed JREs
Select your JRE and click “Edit”.
On the “Edit JRE” screen select the entry for rt.jar and click “Source Attachment”
For me I used as JRE C:\Program Files\Java\jdk1.6.0_04\jre and with that my source attachment was in C:\Program Files\Java\jdk1.6.0_04\src.zip.
Hope this helps ..
No comments:
Post a Comment