Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Attaching Source in the Class file editor of Eclipse

 
Vinod Vinu
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...I'm using Eclipse Helios. I want to attach source in it.
Because whenever i try to open any parent class say 'String' or 'HttpServlet' then it does not open that class and give me message to attach the source file.
Please tell me which source file it is exactly asking for? And how can i get those source files first and attach in my eclipse. So that in future i don't face such issues.
Thanks in advance for your precious time.
 
Vinod Vinu
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any response?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To attach the SDK source, go to you project's properties dialog, select Java Build Path, then under Libraries select a library (or the JDK) and expand it. One of the subentries might be the source attachment. For a JDK, point it to the src.zip file in the JDK's root directory. Though in Helios you should not have to atatch the source - Eclipse should find it. You might have to add a JDK to the Installed JREs in the preferences though (Eclipse usually picks up a JRE instead of a JDK and JREs don't have source code attached to them).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic