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

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

dialogue

Steps for adding external jars in IntelliJ IDEA:

  1. Click File from the toolbar
  2. Select Project Structure option (CTRL + SHIFT + ALT + S on Windows/Linux, + ; on Mac OS X)
  3. Select Modules at the left panel
  4. Select Dependencies tab
  5. Select + icon
  6. Select 1 JARs or directories option

IntelliJ IDEA 15 & 2016

  1. File > Project Structure…

    File

    or press Ctrl + Alt + Shift + S

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

    Modules

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

    enter

    enter

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

    enter

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

Just copy-paste the .jar under the libs folder (or whole libs folder), right click on it and select Add as library option from the list. It will do the rest…

enter

Leave a Reply

Your email address will not be published.