Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
392 views
in Technique[技术] by (71.8m points)

java - 将外部jar(lib / *。jar)添加到IntelliJ IDEA项目的正确方法(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:

(在IntelliJ IDEA中创建新的Java项目时,将创建以下目录和文件:)

./projectname.iml
./projectname.ipr
./projectname.iws
./src/

I want to configure IntelliJ IDEA to include my dependency JARs in ./lib/*.jar to the project.

(我想将IntelliJ IDEA配置为将我的依赖项JAR ./lib/*.jar在项目的./lib/*.jar中。)

What is the correct way to achieve this in IntelliJ IDEA?

(在IntelliJ IDEA中实现此目标的正确方法是什么?)

  ask by knorv translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Steps for adding external jars in IntelliJ IDEA:

(在IntelliJ IDEA中添加外部jar的步骤:)

  1. Click File from the toolbar

    (从工具栏中单击File)

  2. Project Structure ( CTRL + SHIFT + ALT + S on Windows/Linux, ? + ; on Mac OS X)

    (项目结构(在Windows / Linux上为CTRL + SHIFT + ALT + S ,在Mac OS X上为? + ))

  3. Select Modules at the left panel

    (在左侧面板中选择模块)

  4. Dependencies tab

    (依赖项选项卡)

  5. '+' → JARs or directories

    ('+'→JAR或目录)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...