How can I add a .jar to my build path in Eclipse?

别等时光非礼了梦想. 提交于 2019-11-30 21:40:48
  1. Right click on the jar you want to add.
  2. Build Path > Add to Build Path

You're done.

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.

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.

I think you are almost correct in adding the jar files to the Selected Project

Right click on the name of the project.

Click on Properties in the menu.

Click on "Java Build Path"

Then select "Libraries"

In "Libraries" Click "Add External JARs...".(if the jar files exists outside the project) Else Click "Add Jars" (if the jars Exists within the project)

Once you do this, workspace builds automatically and after that your application is set to use for the development.

Click "Add Jar" and select the jar from your project path.

If the jar is already in you project directory click "Add jar" in the Libraries-tab. If not click "Add external jar". That should do it.

If your jar does not show up when you click "Add jar" although you have copied it to your project directory you should refresh your project. Just go to your project explorer in eclipse, right click on the project-name and click "Refresh".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!