解决使用Eclipse中调用javadoc的问题


像Microsoft Visual Studio 一样,使用Eclipse编写java代码时,将鼠标放在相应方法或字段等元素上时,会有对应的说明或提示。

不过,常出现下面的问题:

Note:An exception occurred while getting the javadoc.see log for details.

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

Note:This element has no attached source and the javadoc could not be found in the attached javadoc

error

javadocerror

点击javadoc下的open input:

2

class editor提示找不到对应的rt.jar文件。

you can attach the source by clicking attach source below

那么,点击“attach source”,加载相应文件即可:

source attach

选择External file:

如果你安装jdk的话,附加文件的路径是:

C:\Program Files\Java\jdk1.6.0_12\src.zip

jdksrc

OK!一切正常了:

提示正常

祝好运……


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM