简体   繁体   English

Eclipse for Java 11 中缺少 Basic Javadoc

[英]Missing Basic Javadoc in Eclipse for Java 11

I recently switched from java 8 to java 11 in eclipse, by installing the newer jdk and switching the jre in eclipse.我最近通过安装较新的 jdk 并在 eclipse 中切换 jre,在 eclipse 中从 java 8 切换到 java 11。 The first thing i noticed, that was not working properly, was the javadoc, which read : "Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc."我注意到的第一件事,它不能正常工作,是 javadoc,它写着:“注意:这个元素没有附加的源代码,在附加的 Javadoc 中找不到 Javadoc。”

I then looked up other users with similar problems, but they were all using different versions of java, and the link in my javadoc configuration doesn't work.然后我查找了其他有类似问题的用户,但他们都使用不同版本的 java,我的 javadoc 配置中的链接不起作用。

(the validate button when selecting the javadoc url also returns "Location might be invalid." for the URL " https://docs.oracle.com/en/java/javase/11/docs/api/ "). (选择 javadoc url 时的验证按钮也会返回“位置可能无效。”对于 URL“ https://docs.oracle.com/en/java/javase/11/docs/api/ ”)。

I suspect that I still have an the old java 8 javadoc installed, which is now looking in the wrong place, but i couldn't find another java 11 javadoc link anywhere.我怀疑我仍然安装了旧的 java 8 javadoc,它现在在错误的位置,但我在任何地方都找不到另一个 java 11 javadoc 链接。

As a workaround, download the offline documentation from https://www.oracle.com/java/technologies/javase-jdk11-doc-downloads.html作为解决方法,请从https://www.oracle.com/java/technologies/javase-jdk11-doc-downloads.html下载脱机文档

In your Eclipse project, open "JRE System Library", right-click "java.base", choose "Properties" from context menu.在您的 Eclipse 项目中,打开“JRE 系统库”,右键单击“java.base”,从上下文菜单中选择“属性”。

In the dialog, check the radio button "Javadoc in archive".在对话框中,选中单选按钮“存档中的 Javadoc”。 For the field "Archive path", browse to your downloaded zip.对于“存档路径”字段,浏览到您下载的 zip。 For the field "Path within archive", browse to "docs/api/java.base".对于“归档中的路径”字段,浏览到“docs/api/java.base”。 Then, "Apply and Close".然后,“应用并关闭”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM