解決使用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