简体   繁体   English

标准Java库的Java-doc问题

[英]Problem with java-doc for standard java library

I recently started using Ubuntu and installed netbeans 6.9.1. 我最近开始使用Ubuntu,并安装了netbeans 6.9.1。 I seem to be missing some javadocs tho that get installed with the windows version. 我似乎缺少一些随Windows版本安装的javadocs。

Basically the netbeans docs are there but when the code completion comes up it only tells me the function prototype. 基本上是netbeans文档,但是当代码完成时,它只会告诉我函数原型。 Where theres usually a description it says that the javadocs are not found and they should be added in the platform or library manager. 通常在描述中指出找不到Javadocs,应该将它们添加到平台或库管理器中。

Basically I just want the docs explaining the methods for basic java, swing, and awt. 基本上,我只希望文档解释基本Java,Swing和awt的方法。 Anyone know what files it is i want to be getting, and can I do it all with apt-get? 有人知道我想要获取什么文件吗,我可以使用apt-get来完成所有操作吗?

OS: Ubuntu 10 操作系统:Ubuntu 10

Probably you have not installed java-doc package: 可能您尚未安装java-doc软件包:

sudo apt-get install sun-java6-doc

or what ever is suitable for you. 或任何适合您的东西。

I had the same problem. 我有同样的问题。 Solution is very simple: 解决方法很简单:

You have to download "Java SE 6 Documentation" from this page (in Additional Resources list) http://www.oracle.com/technetwork/java/javase/downloads/index.html 您必须从此页面(在“其他资源”列表中)下载“ Java SE 6文档” http://www.oracle.com/technetwork/java/javase/downloads/index.html

It is a zip file (~50 mb). 这是一个zip文件(〜50 mb)。 Put this file to some place you like(I suggest you to put it to the JDK directory, but you can put it to your home directory) and then open NetBeans. 将此文件放在您喜欢的位置(我建议您将其放在JDK目录中,但可以将其放在主目录中),然后打开NetBeans。

Select Tools -> Java Platforms. 选择工具-> Java平台。 Then select JDK on the left window. 然后在左侧窗口中选择JDK。 In the Javadoc tab, click Add ZIP/Folder and choose file you recently download. 在Javadoc标签中,点击添加ZIP /文件夹,然后选择您最近下载的文件。

When you done this, your javadoc in code completition windows will work correctly. 完成此操作后,代码完成窗口中的javadoc将正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM