Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve "This element has no attached source and the Javadoc could not be found in the attached Javadoc"?

I don't get the exact method to do this. I want a method not for a single project for all projects in eclipse. Please tell me how to solve this problem.

like image 292
akki Avatar asked May 24 '11 05:05

akki


People also ask

How to attach source and javadoc in Eclipse?

In Eclipse, go to Window -> Preferences -> Java -> Installed JREs -> Add and choose the JDK you have in your system. Eclipse will now list the JARs found in the dialog box. There, select the rt. jar and choose Source Attachment.

How do I import a javadoc?

"Right Click the JAR file in Project Explorer -> Properties -> From the left pane choose Javadoc Location -> enter the URL of your jar documentation. Generally you can Google for: javadoc lib-name and then pickup the URL of the first site suggested by Google - going up a level." Hope this helps!

Where do I find javadoc?

Finding the Javadoc To locate the Javadoc, browse to your User folder (on Windows 7 this is C:\Users\*Username*), then browse to sunspotfrcsdk/doc/javadoc. Double click on the index. html file to open it in your default webbrowser.


1 Answers

This is for a jar on your classpath in Eclipse, where you have

  1. attached a javadoc zip which Eclipse for some reason dislikes.

  2. NOT attached a valid source jar.

The easiest way is to right-click the jar in question (in the referenced jars, not the physical jar) and choose Preferences -> Javadoc. Here give a correct location (zip/URL) to the correct javadoc. Remember to use the "Validate" button to ensure that it is correctly set up.

like image 139
Thorbjørn Ravn Andersen Avatar answered Oct 25 '22 00:10

Thorbjørn Ravn Andersen