Predefined collection of classes and functions provided for the users are named as Java Application Programming Interface (API) and also provides an index of class, objects, and various procedures for each of these classes, so programmers will be saved from getting a headache when writing codes for different tasks.
Those who wish to create JAVA/ JAVA API-based programs and software is a blessing for them. It shortens codes by just connecting the interface within the code. For example, if we wish to create a stack in our program, then in place of writing codes for push and pop operation, we just need to call methods of push and pop.
JAVA API overview:
The Java Application Programming Interface (API) documentation is organized into three separate containers/windows. The contents being viewed are shown by the main larger Window on the right side.
Then the upper left window lists the packages and lower left window lists all classes included in JAVA SE7 edition.
Steps to Download JAVA API for offline Access:
1. Firstly, by using this link, you have to download JAVA SE Development Kit documentation.
2. Once the download gets completed, extract it and copy the ‘docs’ folder inside your JDK directory.
3. Now, to launch the JAVA API documentation, open ‘index.html’ from the ‘docs’ folder (to any of the Internet Browser).
4. To go to the documentation section of Java API, click on the JAVA SE API link.
You can also start with the file, index.html, which can be found in the folder of docs/API.
Adding JAVA API in Eclipse:
1. Open Eclipse> go to Windows in menu bar > click on ‘Preferences.
2. Now do exactly what is done in the image given below:
3. After that, click on ‘installed jre’ > click “edit”.
4. In the next step, select jre system libraries by pressing <Ctrl> +a, so that all libraries can be selected, then click on Javadoc location.
5. Again, do exactly what is done in the figure given below.
6. Note that you have to give both paths; one is archive path (similar to your file path) and the second is a path to the API folder (placed in archive).
You have successfully added Javadoc to your Eclipse.