Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAVA Source Attachment in Eclipse

 
ShaikSalam Bashoeb
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

May I know how to attach java source in eclipse so that i can see api code by clicking on the api classes.

and from where we can download the java source (servlet or jsp or jstl etc..)
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your project's properties, go to Java Build Path, and on the Libraries tab, expand the JAR files - there will be source files entry - select that and click the Edit button and point it to the source code.

Where to get the source depends on the JAR; usually you can get the source form the same location from which you obtained the binary JAR. If you are using maven, you can ask it to also get the source JAR (which is made extremely easy if you have the m2eclispe plugin) and then access the source in your local repository.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic