eclipse中的javadoc英文注释解释不显示
1)问题描述:
java.lang.String
Note:The attached Javadoc could not be retrieved as the specified Javadoc location is either wrong or currently not accessible.
2)问题分析:
(不想知道原因,可直接去看下面的方法)
能打开并且正常使用eclipse,就说明你不缺文件。就是说,电脑的jre或jdk没问题,放心。如果没有乱调路径的话,javadoc加载不出来,是软件没找到rt.jar
,这个文件导致的;只是小问题;
3)解决方法:
<1>
鼠标点间选中关键字,例如:String,右键,选择Open Declaration,打开;
<2>
新的页面出现:
Source not found
The JAR file C:\Program Files\Java\jre1.8.0_251\lib\rt.jar
has no source attachment.you can attach the source by clicking Attach Source below:
Attach Source…
<3>
依次点击Attach Source…–>External location–>External file…–>找到rt.jar并选中–>OK;
<4>
恭喜你,javadoc回来了。
注:第4步如何找rt.jar包,你要知道自己的jre安装路径,注意是安装路径!!不是下载安装包的那里;去这个页面提示的路径下找找,如上所示,我的提示的是:C:\Program Files\Java\jre1.8.0_251\lib\rt.jar