Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project

后端 未结 9 1488
时光取名叫无心
时光取名叫无心 2020-11-21 10:20

When creating a new Java project in IntelliJ IDEA, the following directories and files are created:

./projectname.iml
./projectname.ipr
./projectname.iws
./s         


        
9条回答
  •  无人共我
    2020-11-21 10:29

    You add them as libraries to your module.

    I usually have a /lib directory in my source. I put all the JARs I need there, add /lib as a library, and make it part of my module dependencies.

    2018 update: I'm using IntelliJ 2017/2018 now.

    I'm fully committed to Maven and Nexus for dependency management.

    This is the way the world has gone. Every open source Java project that I know of uses Maven or Gradle. You should, too.

提交回复
热议问题