Search code examples
javaeclipseini4j

How to import new APIs into 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.


Solution

  • 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)

    Refresh your eclipse project, so the new files show up. Right click on them and select Build Path -> Add to Build Path

    You can also right click on your project and select Build Path -> Configure Build Path