Javadoc 在 Eclipse 中不可用
我正在使用 Eclipse IDE for Java Developers
版本:Helios Service Release 2 构建 ID:20110218-0911
我有一个与此类似的问题 stackoverflow 问题
在阅读其他问题时,我发现这个错误
该元素没有附加源代码,并且在附加的 Javadoc 中找不到 Javadoc
这是由于 Eclipse 无法找到 javadoc 文件造成的。
我查了一下,我在c程序文件/java位置都有JDK和JRE。 我在 C:\Program Files\Java\jdk1.6.0_30 处有 src.zip 文件,在 C:/Program Files/Java/jre6/lib/rt.jar 处有 src lib 文件,
这两个路径都在类路径变量中设置。
安装的 JRE 指的是 C:\Program Files\Java\jre6,所有 JRE 系统库的 javadoc 位置设置为 http://java.sun.com/javase/6/docs/api/
但我仍然无法看到鼠标悬停在任何 java 或 android 方法上的 javadoc
你有吗关于如何获得这个的任何建议 在职的?
I am using Eclipse IDE for Java Developers
Version: Helios Service Release 2
Build id: 20110218-0911
I have a problem similar to this stackoverflow question
On reading other questions, I have found that the error
This element has no attached source and the Javadoc could not be found in the attached Javadoc
is caused by Eclipse not being able to locate the javadoc file.
I checked, I have both JDK and JRE in c program files / java location.
I have src.zip file at C:\Program Files\Java\jdk1.6.0_30, I have src lib file at C:/Program Files/Java/jre6/lib/rt.jar
Both these paths are set in classpath variables.
Installed JRE is referring to C:\Program Files\Java\jre6 and javadoc location for all JRE system libraries is set to http://java.sun.com/javase/6/docs/api/
But still I am not able to see the javadoc on mouse hover of any java or android methods
Do you have any advice on how to get this working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在 Eclipse 中,转到“窗口”、“首选项”,然后导航至 javadoc 选项或在显示“的位置键入 javadoc”输入过滤文本'。
检查是否选中了“处理 Javadoc 注释”选项。
在您选中/取消选中该选项后,它可能会要求您对项目进行完全重建。
In Eclipse, go to Window, Preferences, and navigate to the javadoc options or type javadoc where it says 'type filter text'.
Check if the options 'Process Javadoc comments' is checked.
It may ask you to do a full rebuild of your projects after you check/uncheck that option.
您似乎正在 Eclipse 中开发 Android 应用程序。
安装 ADT 插件后,您不再使用标准 Java JDK,而是使用 Android 版本。
要解决此问题,您需要使用 Android SDK 和 AVD Manager 安装“Android SDK 文档”包。
这会将文档文件夹放入适合 eclipse + ADT 插件的 android sdk 位置,以向您提供 javadoc 帮助弹出窗口。
You seem to be developing an Android App in Eclipse.
When you have the ADT plugins installed you are no longer using the standard Java JDKs, but rather the android versions.
To fix this you'll want to Install "Documentation for Android SDK" package using Android SDK and AVD Manager.
This will place the documentation folder into the android sdk location suitable for eclipse + the ADT plugins to supply you javadoc help popups.
Eclipse Mars (4.5.1) 也有同样的问题。我需要手动将 rt.jar 的源附件分配给 src.zip:
Had the same problem with Eclipse Mars (4.5.1). I needed to assign the Source attachment of rt.jar to the src.zip manually:
选项卡/窗口将打开,并显示文本“找不到源”和按钮
“附加源”在其中。
希望这能回答您的问题。
tab/window will opened with text "Source not found" and button
"Attach Source" in it.
Hope this answers your question.