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

How to display Java API source code in Eclipse

 
Alessandro Calciati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I display Java API source code in Eclipse?
 
Alessandro Calciati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Done.

1) Download the sources, from "http://java.sun.com/javase/downloads/index.jsp" choose "Java SE 6 JDK Source Code".
2) Extract the sources: "java -jar jdk-6u1-ea-src-b03-jrl-19_jan_2007.jar"
3) From Eclipse, choose the command Preferences->Java->Installed JREs
4) Edit the default JRE
5) Source attachment...
6) External folder -> j2se/src
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, if you point Eclipse at a JDK (instead of just an JRE), it should pick up the source code automatically. Check Window/Preferences/Java/Installed JREs
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic