将外部jar(lib / * .jar)添加到IntelliJ IDEA项目的正确方法 [英] Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project

查看:1245
本文介绍了将外部jar(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以将我的依赖JAR包含在项目的 ./ lib / * .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:


  1. 从工具栏中点击文件

  2. 项目结构( Windows / Linux上的 CTRL + SHIFT + ALT + S + < kbd>; 在Mac OS X上)

  3. 在左侧面板中选择模块

  4. 依赖关系选项卡

  5. '+'→ JAR或目录

  1. Click File from the toolbar
  2. Project Structure (CTRL + SHIFT + ALT + S on Windows/Linux, + ; on Mac OS X)
  3. Select Modules at the left panel
  4. Dependencies tab
  5. '+' → JARs or directories

这篇关于将外部jar(lib / * .jar)添加到IntelliJ IDEA项目的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆