使用右键单击项目时,如何在 Eclipse 中添加“构建路径”选项?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6624330/
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
How to add "Build path" option in Eclipse, when clicking on a project with right button?
提问by Pawe? Czech
As in a topic. I can not find solution, how to add that option to right button list.
就像在一个主题中一样。我找不到解决方案,如何将该选项添加到右键列表中。
回答by Loy Alvares
In the Toolbar Menu, click on "Window->Show View->Package Explorer.
在工具栏菜单中,单击“窗口->显示视图->包资源管理器”。
This should fix the issue.
这应该可以解决问题。
回答by Utku
It was a problem of mine too. Have you tried:
这也是我的一个问题。你有没有尝试过:
- Right click on the project's name.
- Click Properties.
- Click Java Build Path that appear on the menu to the left.
- From the buttons that appear on the right, click Add External JARs.
- From the window that appears, find the jar file(s) that you want to add and then click open. It should be done now.
- 右键单击项目名称。
- 单击属性。
- 单击左侧菜单上显示的 Java Build Path。
- 从右侧出现的按钮中,单击添加外部 JAR。
- 从出现的窗口中,找到要添加的 jar 文件,然后单击打开。现在应该做。
回答by ifx
You need to ensure that your project (.project file in your project's root directory) includes the Java Nature and build spec, for example:
您需要确保您的项目(项目根目录中的 .project 文件)包含 Java Nature 和构建规范,例如:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>project_1_x</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
回答by ArunM
Right click on the project -> Search Project Facets -> Convert to faceted project -> Enable the builder (ex. Java)
右键单击项目 -> Search Project Facets -> Convert to faceted project -> Enable the builder (ex. Java)