[英]Javadoc never showing in eclipse
Whenever I try to access the Javadoc for any class in Eclipse by hovering over a reference to it, it either says An exception occurred while getting the Javadoc
or This element has no attached source and the Javadoc could not be found in the attached Javadoc
.每当我尝试通过将鼠标悬停在对它的引用上来访问 Eclipse 中任何类的 Javadoc 时,它要么说
An exception occurred while getting the Javadoc
,要么显示This element has no attached source and the Javadoc could not be found in the attached Javadoc
。 I've read through several solutions on StackOverflow and have tried them all including:我已经阅读了 StackOverflow 上的几个解决方案,并尝试了所有解决方案,包括:
Validate
on it it even says the location is likely valid.Validate
时,它甚至说该位置可能有效。 The weird thing is, if I click on View Javadoc in Browser
it opens directly to the correct Javadoc.奇怪的是,如果我单击
View Javadoc in Browser
它会直接打开正确的 Javadoc。
As you can see in the exception message, Eclipse is currently using the JRE
instead of the JDK
, since it is set up as the primary one (according to the second screenshot).正如您在异常消息中看到的,Eclipse 当前使用的是
JRE
而不是JDK
,因为它被设置为主要的(根据第二个屏幕截图)。 Remove the JRE library
from the project, you don't need it anymore.从项目中删除
JRE library
,您不再需要它了。 The JDK
contains everything you need, including the JavaDoc. JDK
包含您需要的一切,包括 JavaDoc。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.