mxgx mxgx - 1 year ago 145
Java Question

IntelliJ: How to import a folder of .java files as a library?

It's probably a stupid question, but I can't figure out how to properly import a folder of

files as a library into my IntelliJ project.

I am trying to use the JavaMoney API, which I downloaded from here.

I know that the normal way would be File > Project Structure > Modules > Dependencies > + JARs or Directories, yet that always adds an "Empty Library" to the list, which is nowhere to be seen in the Project View.

Could someone set me on the right track here?

Answer Source

You should not use the sources directly. You should start to use maven (or gradle). In that case you can simply add a dependency:


If you don't want to use maven, you should import the existing maven project from the repository and export it as a *.jar file.

Or you simply download the prebuilt version from a mvn-repository.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download