如何在Eclipse中添加.jar到我的构建路径? [英] How can I add a .jar to my build path in Eclipse?

查看:150
本文介绍了如何在Eclipse中添加.jar到我的构建路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试以下方式进行:


  1. 右键单击项目名称。

  1. Right click on the name of the project.

点击建立路径,点击删除黎明菜单。

Click on Build Path in the drop dawn menu.

/ p>

Click on "Configure Build Path"

然后我不知道该怎么办。我应该选择源,项目,库,订单和导出?

And then I do not know what to do. Should I select "Source", "Projects", "Libraries", "Order and Export"?

在库中,我有添加JAR ...和添加外部JAR ...。我应该选择什么? (我的项目的lib文件夹中已经有一个.jar文件。)

In "Libraries" I have "Add JARs..." and "Add External JARs...". What should I select? (I have already a .jar file in the lib folder of my project.)

ADDED:

如果我点击库选项卡中的添加JAR,我看到lib子文件夹,但如果我去那里,我没有看到我的.jar文件(我知道它

If I click on "Add JARs" in the "Libraries" tab, I see the "lib" sub-folder but if I go there I do not see my .jar file there (and I know that it is there).

推荐答案


  1. 右键单击要添加的jar。

  2. 构建路径> 添加到构建路径

  1. Right click on the jar you want to add.
  2. Build Path > Add to Build Path


    你已经完成了。

You're done.

如果你想使用 Java Build路径视图,您尝试使用添加JARs 。如果您通过文件系统复制库,则项目不同步。您可以在所选项目上按 F5

If you want to add the Library with the Java Build Path view, as you tried you have to use Add JARs. If you copied the library via File System the Project is not in sync. You could press F5 on the selected Project.

如果您在Eclipse之外编辑了很多,可以启用自动 - 转到窗口>首选项菜单,然后在首选项对话框中,选择常规>工作区
检查自动刷新框。

If you edit outside of Eclipse a lot, you can enable auto-refresh by going to Window > Preferences menu, then in the Preferences dialog box, select General > Workspace. Check the Refresh automatically box.

这篇关于如何在Eclipse中添加.jar到我的构建路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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