English 中文(简体)
Javadoc, Eclipse
原标题:Javadoc not available in Eclipse

I am using Eclipse IDE for Java Developers

Version: Helios Service Release 2 Build id: 20110218-0911

I have a problem similar to this stackoverflow question

在阅读其他问题时,我发现错误

This element has no attached source and the Javadoc could not be found in the attached Javadoc

Eclipse无法找到javadoc档案。

I checked, I have both JDK and JRE in c program files / java location. I have src.zip file at C:Program FilesJavajdk1.6.0_30, I have src lib file at C:/Program Files/Java/jre6/lib/rt.jar

Both these paths are set in classpath variables.

Installed JRE is referring to C:Program FilesJavajre6 and javadoc location for all JRE system libraries is set to http://java.sun.com/javase/6/docs/api/

But still I am not able to see the javadoc on mouse hover of any java or android methods

你们是否就如何开展这项工作提出任何建议?

问题回答

enter image description here

In Eclipse, go to Window, Preferences, and navigate to the javadoc options or type javadoc where it says type filter text . Check if the options Process Javadoc comments is checked. It may ask you to do a full rebuild of your projects after you check/uncheck that option.

You seem to be developing an Android App in Eclipse. When you have the ADT plugins installed you are no longer using the standard Java JDKs, but rather the android versions.

To fix this you ll want to Install "Documentation for Android SDK" package using Android SDK and AVD Manager. This will place the documentation folder into the android sdk location suitable for eclipse + the ADT plugins to supply you javadoc help popups.

Had the same problem with Eclipse Mars (4.5.1). I needed to assign the Source attachment of rt.jar to the src.zip manually:

  • Navigate to your project s property page: Project > Properties > Java Build Path > JRE System Library > rt.jar > Source attachment.
  • Click Edit..., choose External location and put the path to src.zip here.
  1. Navigate to that method by Ctrl+Click on the method. The new tab/window will opened with text "Source not found" and button "Attach Source" in it.
  2. Click the button "Attach Source" New window pops up.
  3. Click the button "External Folder".
  4. Click the button "External File"
  5. If you are on Windows with default installation settings, then the folder path is C:Program FilesJavajre1.8.0_151lib and then click on rt.zip file and click on "Open".
  6. Click the button "OK"

Hope this answers your question.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签