Correct Way To Add External Jars (lib/*.jar) To An IntelliJ IDEA Project


Answer :

dialogue in Intellij 20.3


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




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 image description here



Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable