如何让Java API Javadoc在Eclipse中显示在Ubuntu中 [英] How to get Java API Javadocs to show up in Eclipse in Ubuntu

查看:114
本文介绍了如何让Java API Javadoc在Eclipse中显示在Ubuntu中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里再次出现文件问题。
在我的大学,当使用Eclipse时,当将光标
放在Java API方法名称(例如:.size())上时,我得到
非常好的文档。



在家里我得到

 注意:附加的来源或附加的Javadoc 
,因此无法找到任何信息。

任何快速简单的apt-get修复?
感谢提前!!!!

解决方案

转到您的JRE设置(窗口>首选项> Java>已安装的JRE ),选择您当前的,然后编辑,并为 rt.jar 设置源附件



您可能需要安装 sun-java6-source openjdk-6-source c $ c>包取决于你正在使用什么。



对于Sun JVM,源将以 /usr/lib/jvm/java-6-sun-1.6.0.15/src结尾。拉链



PS:我建议使用Sun JDK,并将其设置为默认值为 sudo update-alternatives --config java 但这更多是一个附注。


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 documentation about it.

Here at home I get

Note: This element neither has attached source nor attached Javadoc
and hence no information could be found.

Any quick and simple apt-get fix? Thanks in advance!!!!

解决方案

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.

这篇关于如何让Java API Javadoc在Eclipse中显示在Ubuntu中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆