Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm having a pretty hard time with this!

I have installed the java documentation at:

file:///usr/share/doc/openjdk-6-jre/api/index.html

And loading that file up does show me all the documentation.

However, I would like to browse it directly from within eclipse and see the documentation when I hover over a class. For example, when I hover over "javax.servlet.http.HttpServletRequest", I would like to see the documentation for it. All I get is:

Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc.

Can anyone help correct my dev environment?

like image 897
Neil Trodden Avatar asked Jun 21 '09 00:06

Neil Trodden


1 Answers

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.

like image 153
Chris Jester-Young Avatar answered Sep 27 '22 21:09

Chris Jester-Young