How do I convince Eclipse to show javadoc documentation under Ubuntu 9.04 for openjdk?

吃可爱长大的小学妹 提交于 2019-12-04 05:50:56

javax.servlet.http.HttpServletRequest is not part of the OpenJDK, and so the OpenJDK documentation would not contain information on it.

You need to install the Servlet API documentation instead, then, in the library section of your Package Explorer tab, right-click servlet-api.jar, and select Properties. You will then be able to select a javadoc location for that.

Alternatively, for an Ubuntu-friendly solution, install the libservlet2.5-java-doc package, then add the javadoc to your Servlet API jar file using the procedure above.

Under Properties, you can enter a URL that hosts the servlet API, such as:

http://tomcat.apache.org/tomcat-5.5-doc/servletapi/

The following procedure will enable Java documentation to be available in Eclipse when you hover over some Java class. Download the Java Documentation (this is for version 6) from http://www.google.co.in/url?sa=t&source=web&ct=res&cd=4&ved=0CC0QFjAD&url=https%3A%2F%2Fcds.sun.com%2Fis-bin%2FINTERSHOP.enfinity%2FWFS%2FCDS-CDS_Developer-Site%2Fen_US%2F-%2FUSD%2FViewProductDetail-Start%3FProductRef%3Djdk-6u10-docs-oth-JPR%40CDS-CDS_Developer&ei=T-z3S87CAYuyNq3UweAF&usg=AFQjCNH54wkg50p7PJGmv6dEJd0zxXTGRA&sig2=Pv8-OZ7ZQEAsh89kUFhvUw This is a zipped file jdk-*-docs.zip ( * indicates the version number, for e.g., 6u18 which implies Java Version 6.18). Open Eclipse. Click on Window > Show View > Javadoc Right click on the Javadoc console. Select Open Input. Click "Change Attached Source". Select "External File". Navigate to the directory in which jdk-*-docs.zip exists. Open it. And there you have it - the entire documentation available to you at your fingertip(mousetip?).

Jimmy

A slightly different method is needed for Android projects in Eclipse, where you specify the JavaDoc location in "Java Build Path", rather than "JavaDoc Location" settings. See the answer here, which worked for me:

Problems with javadoc

(The JavaDoc problem started happening to me when I deleted my old Android SDK folder.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!