如何在eclipse中导入com.sun.javadoc.*?
导入 com.sun.javadoc eclipse 向我报告此错误“导入 com.sun.javadoc 无法解析”,似乎未安装该包。查看网站http://download.oracle.com/javase/1.5.0/docs/guide/javadoc/doclet/spec/index.html?com/sun/javadoc/package-summary.html 仅显示了 API,但我无法下载任何内容。我该怎么办
Importing com.sun.javadoc eclipse report me this error "The import com.sun.javadoc cannot be roselved" it seems the package is not installed. Looking at the web sitehttp://download.oracle.com/javase/1.5.0/docs/guide/javadoc/doclet/spec/index.html?com/sun/javadoc/package-summary.html only the API are displayed but I cannot download anything. How can I do
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我通常做的是,在 Eclipse 首选项中,定义一个名为“JDK XYZ”的已安装 JRE,并将
tools.jar
作为其库的一部分。然后我更改项目首选项以使用该 JRE“JDK XYZ”。另一种方法是简单地将
tools.jar
添加到项目的库中或在项目路径中指向它。What I usually do is, in Eclipse preferences, I define an Installed JRE called "JDK X.Y.Z" and include
tools.jar
as part of it libraries. Then I change the project preferences to use that JRE "JDK X.Y.Z".The other approach is to simply add
tools.jar
to your project's library or point to it in the project path.您需要将 JDK 安装中的 Tools.jar 添加到项目的构建路径中。
在 Package Explorer 中右键单击您的项目,然后转到属性。单击左侧的“Java 构建路径”。转到“库”选项卡并单击“添加外部 JAR”。导航到 JDK 安装并转到 LIB 文件夹。选择tools.jar,然后点击确定。
You need to add Tools.jar from the JDK install into your project's build path.
Right click your project in the Package Explorer, and go to properties. On the left, click "Java Build Path". Go to the "Libraries" tab and click "Add External JARs". Navigate to your JDK install and go to the LIB folder. Select tools.jar, and hit okay.
http://java.sun.com/j2se/javadoc /faq/index.html#com.sun.javadoc
JDK 的tools.jar 通常不包含在Eclipse 项目类路径中。如果可以的话,您应该避免使用 com.sun.* 代码。
http://java.sun.com/j2se/javadoc/faq/index.html#com.sun.javadoc
The JDK's tools.jar is not typically included in Eclipse project class paths. You should avoid using com.sun.* code if you can.
您实际上安装了 JDK,还是只是安装了 JRE?
另请参阅依赖于 Eclipse 中的 tools.jar (Sun JDK) 中的 com.sun.javadoc。
Do you actually have a JDK installed, or maybe just an JRE?
Also see Depending on com.sun.javadoc from tools.jar (Sun JDK) in Eclipse.