When creating a new Java project in IntelliJ IDEA, the following directories and files are created:
./projectname.iml ./projectname.ipr ./projectname.iws ./src/
I want to configure IntelliJ IDEA to include my dependency JARs in ./lib/*.jar
to the project. What is the correct way to achieve this in IntelliJ IDEA?
You can right-click on the project, click on export, type 'jar', choose 'Runnable JAR File Export'. There you have the option 'Extract required libraries into generated JAR'.
File > Project Structure...
or press Ctrl + Alt + Shift + S
Project Settings > Modules > Dependencies > "+" sign > JARs or directories...
Select the jar file and click on OK, then click on another OK button to confirm
You can view the jar file in the "External Libraries" folder
Steps for adding external jars in IntelliJ IDEA:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With