如何说服Eclipse在Ubuntu 9.04下为openjdk显示javadoc文档? [英] How do I convince Eclipse to show javadoc documentation under Ubuntu 9.04 for openjdk?

查看:249
本文介绍了如何说服Eclipse在Ubuntu 9.04下为openjdk显示javadoc文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对此很难受!

我在以下位置安装了Java文档:

I have installed the java documentation at:

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

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

然后加载该文件确实会向我显示所有文档。

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

但是,我想直接在eclipse中浏览它,并在悬停时查看文档一堂课。例如,当我将鼠标悬停在 javax.servlet.http.HttpServletRequest上时,我想查看其文档。我得到的是:

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:


注意:该元素没有附加的
源,并且找不到Javadoc

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?

推荐答案

javax.servlet.http.HttpServletRequest 不是OpenJDK的一部分,因此OpenJDK文档不会包含有关它的信息。

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

您需要安装而是使用Servlet API 文档,然后在程序包资源管理器选项卡的库部分中,右键单击 servlet-api.jar ,然后选择属性。然后,您将能够为此选择一个Javadoc位置。

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.

或者,对于Ubuntu友好的解决方案,安装 libservlet2.5-java -doc 包,然后按照上述步骤将javadoc添加到Servlet API jar文件中。

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.

这篇关于如何说服Eclipse在Ubuntu 9.04下为openjdk显示javadoc文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆