This element neither has attached source nor attached javadoc... Solution

Source: Internet
Author: User
This element neither has attached source nor attached Javadoc and hence no javadoc cocould be found

Eclipse has the ability to directly view the Java documentation and Class Library source code, but you have to manually add it. Next we will summarize how to add the Java documentation and Class Library source code in eclipse.

1. Window-> pereferences... open the parameter selection dialog box, expand the Java node, and click "installed jres". The loaded JRE is displayed in the right window.

2. Select the JRE version to be set and click "edit". The JRE editing window is displayed.

3. Add javadoc: select all the packages under JRE system libraries, and click the "javadoc location" button on the right to bring up the javadoc setting window. Select "javadoc URL" single region, click "Browse", select the docs/API directory, and click "OK"

4. Add Source: select all the packages under JRE system libraries and click "Source attachment" on the right to bring up the "source attachment configuration" window. Click "external filepath" to select the src.zip file in the Java installation directory, and then click "OK"

5. OK and OK.

After adding Javadoc and source, you can use the shortcut key "Shift + F2" in eclipse to quickly call up the API documentation of the selected class; you can use Quick F3 (or right-click on the class and view the Declaration now) to open the source file of the class.

 

The following is a simple solution:

Project ----- properties ---- Java build path -- add lib dialog box select JRE system library --- in the line of alternate JRE, click installed JRE. In the new dialog box, click Add ------ select standard VM -- JRE home and select the JRE folder under the JDK folder you have installed. For example, my file is D: \ Program file \ Java \ jdk1.6.0 _ 32 \ JRE.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.