Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project
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?
Steps for adding external jars in IntelliJ IDEA:
File
from the toolbar IntelliJ IDEA 15 & 2016
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
Just copy-paste the .jar under the libs folder, right click on it and select 'Add as library' option from the list. It will do the rest...
链接地址: http://www.djcxy.com/p/29674.html上一篇: Maven模块+构建单一特定模块