本文介绍了神秘的Eclipse Javadoc问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中查找Java文档时遇到了问题.我似乎已经解决了该问题,但是由于两个原因,我将其发布:我想知道为什么我首先遇到该问题,也许我的解决方法可能对遇到类似问题的其他人很有用.

I had a problem with finding Java docs in Eclipse. I seem to have fixed the problem, but I'm posting this for two reasons: I would like to know why I had the problem in the first place and perhaps my method of fixing it might be useful to someone else having a similar problem.

我在Eclipse中创建了一个简单的Java项目(在Windows 7上为Helios),然后选择了JavaSE-1.6 JRE.然后,我创建了一个源文件并导入了java.util.GregorianCalendar.当我将鼠标悬停在GregorianCalendar上时,我得到了以下消息:

I created a simple Java project in Eclipse (Helios on Windows 7) and selected the JavaSE-1.6 JRE. Then I created a source file and imported java.util.GregorianCalendar. When I hovered over GregorianCalendar, I was getting the message:

GregorianCalendar的方法似乎都没有任何Javadoc.其他标准Java类(甚至java.util中的其他类,例如ArrayList)也没有此问题;只有GregorianCalendar.一切似乎都在项目设置中正确设置.在Java构建路径中设置的Javadoc位置为http://java.sun.com/javase/6/docs/api/.

None of the methods of GregorianCalendar seemed to have any Javadoc, either. Other standard Java classes (even others in java.util, like ArrayList) didn't have this problem; only GregorianCalendar. Everything seemed set up properly in the project settings. The Javadoc location set in the Java Build Path was http://java.sun.com/javase/6/docs/api/.

我设法通过暂时切换到JavaSE-1.7,然后再返回来恢复正确的行为.显然,有些东西被重置了,一切都很好.虽然我很高兴现在一切正常,但我不喜欢一开始就弄不清楚它们是如何弄乱的.

I managed to restore correct behavior by temporarily switching to JavaSE-1.7 and then back. Evidently something got reset and all is well. While I'm happy that things are now working, I don't like being clueless as to how they got messed up in the first place.

任何人都可以对此提供任何见解吗?

Can anyone provide any insights into this?

推荐答案

我认为一般支持取决于JDK目录中是否存在src.zip,当您自动搜索Java安装目录时会检测到该src.zip.它可能会丢失.不确定是否使用在线Javadocs.

I think general support relies on the presence of a src.zip in your JDK directory, which is detected when you autosearch a directory for Java installations. It could be missing. Not sure if online Javadocs are used.

这篇关于神秘的Eclipse Javadoc问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 03:03