为什么 Eclipse 找不到 JavaDoc?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11400198/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why can't Eclipse find the JavaDoc?
提问by John
I have installed the Java3D API and the documentation. Here is where I got the documentation from:
我已经安装了 Java3D API 和文档。这是我从那里获得文档的地方:
http://www.oracle.com/technetwork/java/javase/tech/index-jsp-138252.html
http://www.oracle.com/technetwork/java/javase/tech/index-jsp-138252.html
now, i followed these instructions to install the JavaDoc for Eclipse:
现在,我按照以下说明为 Eclipse 安装 JavaDoc:
JavaDoc in an Eclipse Android Project
I set the path of the documentation for the jars to the location of the documentation on my computer. When I click on an Object name in Eclipse, the popup window pops up, but it says "Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found." Is there anything I'm missing here? It would be a lot more convenient if the info could just show up in the popup window instead of me rooting through the documentation by hand.
我将 jars 的文档路径设置为我计算机上文档的位置。当我在 Eclipse 中单击对象名称时,弹出窗口会弹出,但它显示“注意:此元素既没有附加源也没有附加 Javadoc,因此找不到 Javadoc。” 有什么我在这里想念的吗?如果信息可以直接显示在弹出窗口中,而不是我手动浏览文档,那将会方便得多。
edit
编辑
this is that my eclipse looks like right now:
这是我的日食现在的样子:
Here is what i have the path set to:
这是我将路径设置为:
http://download.java.net/media/java3d/javadoc/1.5.2-latest/
http://download.java.net/media/java3d/javadoc/1.5.2-latest/
Still no luck, i still get the same popup saying it can't find the javadoc.
仍然没有运气,我仍然收到相同的弹出窗口,说它找不到 javadoc。
回答by Morfic
Normally that should do the trick, but I'll just try to rephrase the instructions you have previously followed, maybe you missed a step:
通常这应该可以解决问题,但我会尝试重新表述您之前遵循的说明,也许您错过了一个步骤:
- Right click your project -> Properties
- Select
Java build path
in the tree on the left - Select
Libraries
tab - [Skip if using maven]Add your library to the classpath
- [Only if using maven]Expand the maven library by clicking on the small arrow in front of it
- Expand the 3d jar options by clicking on the small arrow in front of it
- Click on the
Edit
button and select your zip location inArchive path
- If you open the zip, you'll see that all the documentation is in the folder
java3d-1_4_0-doc
. You should add that to thePath within archive
input box - Click ok, ok, ok...
- 右键单击您的项目-> 属性
Java build path
在左侧的树中选择- 选择
Libraries
标签 - [如果使用 maven 则跳过]将您的库添加到类路径
- 【仅当使用maven时】点击前面的小箭头展开maven库
- 单击前面的小箭头展开 3d jar 选项
- 单击
Edit
按钮并选择您的 zip 位置Archive path
- 如果您打开 zip,您会看到所有文档都在文件夹中
java3d-1_4_0-doc
。您应该将其添加到Path within archive
输入框中 - 单击确定,确定,确定...
This should set you up. You could also extract the archive to a desire folder or use the online URL (the one that bitwave suggested, but please be aware that you'll be needing a constant internet connection to access it) and specify whichever you want in the Javadoc URL
input box.
这应该让你有所准备。您还可以将存档解压缩到所需文件夹或使用在线 URL(bitwave 建议的URL ,但请注意,您需要持续的互联网连接才能访问它)并在Javadoc URL
输入框中指定您想要的任何内容。
Cheers
干杯
回答by bitwave
It's not your problem ;)
这不是你的问题;)
The documentation is a collection of HTML-files. (like this)
该文档是 HTML 文件的集合。(像这样)
You have to unpack the zip and then you can view this in a browser like Internet Explorer or Google Chrome via File->Open File...
您必须解压缩 zip,然后才能在 Internet Explorer 或 Google Chrome 等浏览器中通过文件->打开文件...
To use the Java-Doc, a special JAR-file must provided by Oracle. In this JAR-file there are .java-files with
要使用 Java-Doc,Oracle 必须提供一个特殊的 JAR 文件。在这个 JAR 文件中有 .java 文件
/**
* This is JavaDoc
*/
/*
*This is a typical comment...
*/
Oracle haven't provided this JAR yet, so you can only use the Browser...
Oracle 尚未提供此 JAR,因此您只能使用浏览器...
Hope I can helped you...
希望我能帮到你...