将外部 jars (lib/*.jar) 添加到 IntelliJ IDEA 项目的正确方法 [英] Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project
本文介绍了将外部 jars (lib/*.jar) 添加到 IntelliJ IDEA 项目的正确方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 IntelliJ IDEA 中创建新的 Java 项目时,会创建以下目录和文件:
When creating a new Java project in IntelliJ IDEA, the following directories and files are created:
./projectname.iml
./projectname.ipr
./projectname.iws
./src/
我想配置 IntelliJ IDEA 以将 ./lib/*.jar
中的依赖 JAR 包含到项目中.在 IntelliJ IDEA 中实现此目标的正确方法是什么?
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?
推荐答案
在IntelliJ IDEA中添加外部jar的步骤:
Steps for adding external jars in IntelliJ IDEA:
- 点击工具栏中的文件
- 选择项目结构选项(CTRL + SHIFT + ALT + S在 Windows/Linux 上,⌘ + ; 在 Mac OS X 上)
- 在左侧面板中选择模块
- 选择依赖项标签
- 选择+图标
- 选择1 个 JAR 或目录选项
- Click File from the toolbar
- Select Project Structure option (CTRL + SHIFT + ALT + S on Windows/Linux, ⌘ + ; on Mac OS X)
- Select Modules at the left panel
- Select Dependencies tab
- Select + icon
- Select 1 JARs or directories option
这篇关于将外部 jars (lib/*.jar) 添加到 IntelliJ IDEA 项目的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文