How do I add the Java API documentation to Eclipse?

前端 未结 14 1422
名媛妹妹
名媛妹妹 2020-11-30 17:34

I have downloaded Java API documentation from http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs and have supposedly attached it to Eclipse using the

相关标签:
14条回答
  • 2020-11-30 18:21

    Eclipse doesn't pull the tooltips from the javadoc location. It only uses the javadoc location to prepend to the link if you say open in browser, you need to download and attach the source for the JDK in order to get the tooltips. For all the JARs under the JRE you should have the following for the javadoc location: http://java.sun.com/javase/6/docs/api/. For resources.jar, rt.jar, jsse.jar, jce.jar and charsets.jar you should attach the source available here.

    0 讨论(0)
  • 2020-11-30 18:22

    For offline Javadoc from zip file rather than extracting it.

    Why this approach?

    This is already answered which uses extracted zip data but it consumes more memory than simple zip file.

    Comparison of zip file and extracted data.

    jdk-6u25-fcs-bin-b04-apidocs.zip  --->  ~57 MB
    after extracting this zip file  --->  ~264 MB !
    

    So this approach saves my approx. 200 MB.

    How to use apidocs.zip?

    1.Open Windows -> Preferences

    enter image description here

    2.Select jre from Installed JREs then Click Edit...

    enter image description here

    3.Select all .jar files from JRE system libraries then Click Javadoc Location...

    enter image description here

    4.Browse for apidocs.zip file for Archive path and set Path within archive as shown above. That's it.

    5.Put cursor on any class name or method name and hit Shift + F2

    0 讨论(0)
提交回复
热议问题