IntelliJ Idea Java Project import jar package, hit jar package

Source: Internet
Author: User

First, import

1. Java project before the jar package is imported,

2. Click File--Project Structure (shortcut CTRL + ALT + Shift + s), click "Modules" on the left side of the project Structure interface

3, in the "Dependencies" tab screen, click on the right Green "+" number, select the first option "JARs or directories ...", select the appropriate jar package, click "OK", the jar package added successfully

4, point "OK" back to the project interface, IntelliJ idea automatically prompt to add import statements, with the Alt+enter key to quickly add import statements, the project successfully compiled

Second, hit the Jar bag

1. Click File--Project Structure (shortcut CTRL + ALT + Shift + s), click "Artifacts" on the left side of the project Structure interface

2, artifacts-> "+", choose the jar, select from modules with dependencies, after the configuration window appears, after the configuration is complete, tick build on make >ok save

3, Menu: Build->make Project, note that there may be a compilation error, it is best to check the compiler version in advance: File>settings>java Compiler, modify the target bytecode Version 1.8, project version structure-project/modules to 1.8

The following is a review of the compiler version, which can be ignored when not required:

(1) File>settings>java Compiler, modify target bytecode version 1.8

(2) Project structure>project/modules version changed to 1.8

4, go to package output path, find jar Package

IntelliJ Idea Java Project import jar package, hit jar package

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.