如何将新的API导入Java? [英] How to import new APIs into Java?
问题描述
我是一名初学者,希望通过Internet上的API使用某些功能, http://ini4j.sourceforge.net/是API的链接,它允许Java与.ini文件进行接口.我已经下载了包含所有导入所需文件的归档文件,但是我不确定如何将它们导入Eclipse,以便可以在Java项目中使用它们,任何帮助将不胜感激.
I'm a beginner programmer and am looking to utilize some features from within an API I came across on the internet, http://ini4j.sourceforge.net/ is the link to the API, it allows Java to interface with .ini files. I've downloaded the archive containing all the files necessary to import, but I'm not sure how to import them into Eclipse so that I can use them with my Java project, any help would be greatly appreciated.
推荐答案
最简单的方法是在您的项目下创建一个新文件夹,例如 lib
并将要使用的库的所有 jar
文件复制到此 lib
文件夹( note 从月食内部完成所有这些操作)
The easiest way is to create a new folder under your project e.g. lib
and copy all the jar
files of the library you want to use to this lib
folder (note you can do all of this from inside eclipse)
刷新您的Eclipse项目,以便显示新文件.右键单击它们,然后选择 Build Path->添加到构建路径
Refresh your eclipse project, so the new files show up. Right click on them and select Build Path -> Add to Build Path
您也可以右键单击您的项目,然后选择 Build Path->配置构建路径
You can also right click on your project and select Build Path -> Configure Build Path
这篇关于如何将新的API导入Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!