如何在Eclipse中导入jar(How to import a jar in Eclipse)

153 IT屋

How do I import a jar in Eclipse?

解决方案

You can add a jar in Eclipse by right-clicking on the Project → Build Path → Configure Build Path. Under Libraries tab, click Add Jars or Add External JARs and give the Jar. A quick demo here.

enter image description here

The above solution is obviously a "Quick" one. However, if you are working on a project where you need to commit files to the source control repository, I would recommend adding Jar files to a dedicated library folder within your source control repository and referencing few or all of them as mentioned above.

如何在Eclipse中导入jar?


解决方案

您可以在Eclipse中添加一个jar,方法是右键单击项目→构建路径→配置构建路径。在"库"选项卡下,单击"添加Jars"或"添加外部JAR",并给出JAR。快速演示此处



enter image description here



上面的解决方案显然是一个"快速"解决方案。但是,如果您正在处理需要将文件提交到源代码控制存储库的项目,我建议将Jar文件添加到源代码控制存储库中的专用库文件夹中,并引用其中几个或全部如上所述。 p>

本文地址:IT屋 » 如何在Eclipse中导入jar