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文件添加到源代码控制存储库中的专用库文件夹,并如上所述引用其中的一部分或全部。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…