How to get Java API Javadocs to show up in Eclipse in Ubuntu

前端 未结 5 1227
傲寒
傲寒 2021-02-14 15:49

I\'m here again with a docs question. At my university, when using Eclipse, when placing the cursor over a Java API method name (for example: .size() ), I get very nice documen

5条回答
  •  北海茫月
    2021-02-14 16:42

    Go to your JRE settings (Window > Preferences > Java > Installed JREs), select your current, then Edit it and set the Source Attachment for rt.jar.

    You might have to install the sun-java6-source or openjdk-6-source packages depending on what you are using.

    For the Sun JVM, sources will end up in /usr/lib/jvm/java-6-sun-1.6.0.15/src.zip.

    PS: I'd suggest to use Sun JDK and to set it as default with sudo update-alternatives --config java but this is more a side note.

提交回复
热议问题