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

后端 未结 9 1486
时光取名叫无心
时光取名叫无心 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:42

    IntelliJ IDEA 15 & 2016

    1. File > Project Structure...

      File > Project Structure

      or press Ctrl + Alt + Shift + S

    2. Project Settings > Modules > Dependencies > "+" sign > JARs or directories...

      Modules > Dependencies > JAR or directories

    3. Select the jar file and click on OK, then click on another OK button to confirm

      enter image description here

      enter image description here

    4. You can view the jar file in the "External Libraries" folder

      enter image description here

提交回复
热议问题