使用JavaDocs为标准Java库配置Eclipse [英] Configuring Eclipse with JavaDocs for standard Java libraries

查看:87
本文介绍了使用JavaDocs为标准Java库配置Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在新PC上安装了JDK 8和Eclipse Kepler,然后导入了从旧PC复制的一些旧项目(该PC已经使用JDK 6,但是可能不相关).

I've installed JDK 8 and Eclipse Kepler on a new PC then imported some old projects copied from an old PC (that had been using JDK 6 but that is probably not relevant).

我收到了似乎不合适的错误.例如,在实现Observer的类中,Eclipse表示我的update方法必须重写超类方法."

I get errors which seem inappropriate. For example in a class that implements Observer, Eclipse says my update method "must override a Superclass method."

当我将鼠标悬停在public class Foo implements Observer {

我得到的不是Javadoc

Instead of Javadoc I get

java.util.Observer
Note: This element neither has attached source nor attached Javadoc 
      and hence no Javadoc could be found.

显然,我需要为所有Java标准库内容附加一些Javadoc.

Obviously I need to attach some Javadoc for all the Java standard library stuff.

一些谷歌搜索和阅读教程并没有使我找到一个明显的解决方案.

Some Googling and reading of tutorials hasn't led me to an obvious solution.

如何在Eclipse中为所有项目/工作区修复此问题?

How do I fix this in Eclipse for all projects/workspaces?

推荐答案

您应该将javadoc位置设置为库本身,而不是Project的javadoc location属性.

you should set the javadoc location to the library itself not to the Project's javadoc location property.

项目>属性> Java构建路径>库展开app.jar节点并选择"Javadoc位置"子节点,您将看到库树右侧的编辑"按钮可用.然后单击编辑"按钮,然后可以在jar文件中选择Javadoc.

Project > Properties > Java Build Path > Libraries expand the app.jar node and select the "Javadoc location" sub node and you will see the "Edit" button at the right of the library tree is available. Then click the "Edit" button and you can choose your javadoc in a jar file.

这篇关于使用JavaDocs为标准Java库配置Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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