When using eclipse for Java program development, you always need to open a CHM File of jdk1.5 at the same time, and then open eclipse to help find the API details. If JDK documentation can be displayed in eclipse help, it will be much easier. In particular, sun's Chinese technical community has translated the original JDK documentation in English, which makes it even better. The method found on the Internet to embed the jdk api documentation into the eclipse help. The test was successful.
Download the jdk1.5 help document:
Http://gceclub.sun.com.cn/chinese_java_docs.html
Http://java.sun.com/javase/downloads/index.jsp
Create a directory org.sun.java.doc. sdk_1.5.0 under Eclipse/plugins/, and then create two files plugin. xml and TOC. xml under this directory.
Contents of the plugin. xml file:
<? XML version = "1.0" encoding = "UTF-8"?>
<? Eclipse version = "3.0"?>
<Plugin
Id = "org.sun.java.doc. SDK"
Name = "Java 2 SDK Doc"
Version = "1.5.0"
Provider-name = "sun.org">
<Requires>
<Import plugin = "org. eclipse. help"/>
</Requires>
<Extension point = "org. eclipse. help. toc">
<Toc primary = "true" file = "toc. xml"/>
</Extension>
</Plugin>
Toc. xml file content:
<? Xml version = "1.0" encoding = "UTF-8"?>
<? Nls type = "org. eclipse. help. toc"?>
<Toc label = "Java 2 SDK Doc">
<Topic label = "API" href = "docs/api/index.html">
</Topic>
</Toc>
Rename the downloaded jdk-rj5_0-doc.zipfile to doc.zip and place it in the same directory as the two files you just created. The file name must be doc.zip. the zip file should have such a directory hierarchy: docs/api/index.html
Use eclipse-clean to restart eclipse.
Start eclipse and go to help contents to see j2sdk API.
The above version has never worked. Let's take a look at the following:
1
. Associated documentation with JDK
Each Query
Go to the API documentation
HTML or CHM
It is indeed a little troublesome to integrate it into eclipse
That's even better. The method is as follows:
Modify
Related JDK documentation
Window-> preferences-> JAVA-> installed jres
[Example]
Modify
Jar
Doc
(The default document location is
Documents on Sun's website
) [Example]
Double-click and point the document to the local
Doc is enough, as shown in]
Use
:
If you encounter a class or method that you do not understand when typing the code, you can select it and click
F1 will automatically help you find the corresponding documents. [Example]
2
In eclipse
Add JDK in help
Document
Yesterday, I saw an interesting open-source project.
Eclipse
Eclipeclipsedocs
URL
: Http://eclipsedocs.sourceforge.net/
Eclipsedocs
This plug-in includes the Java SDK Documentation (including Java 2 SE 5.0 SDK (JDK 5.0) Docs, Java 2 SE 1.4.2 SDK Documentation, Java
2 EE 5.0 sdk api Docs) and other documents (Apache Ant 1.6.5. Apache SOAP v2.3.1 Documentation, Apache Struts Framework, Xerces Java Parser 1.4.4, and Xerces will be added one after another.
Java Parser 2.8.0 and C ++ documents) are integrated into Eclipse to help the system easily browse and search during development.
He used
JDK5.0
The document is in English. Now that there is a Chinese version of the document, change it.
OK. After the plug-in is downloaded, the document is
Zip exists. decompress the package and
You can change the api directory to our own Chinese version.
Eclipse
It is very troublesome to add your own documents in the help. I didn't expect to have this small plug-in. Haha, the installation is also convenient, just copy and paste it. Let's see the effect.
In this way, the document is mainly based on its search function,
Now, let's go here. I hope it will help you ~