Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
213 views
in Technique[技术] by (71.8m points)

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

如何在Eclipse中导入jar?

  ask by user395734 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can add a jar in Eclipse by right-clicking on the Project → Build Path → Configure Build Path.

(您可以通过右键单击项目→构建路径→配置构建路径,在Eclipse中添加一个jar。)

Under Libraries tab, click Add Jars or Add External JARs and give the Jar.

(在“库”选项卡下,单击“添加罐子”或“添加外部JAR”,然后提供罐子。)

A quick demo 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.

(但是,如果您正在从事一个需要将文件提交到源代码控制存储库的项目,我建议将Jar文件添加到源代码控制存储库中的专用库文件夹,并如上所述引用其中的一部分或全部。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...