How IDEA creates an ordinary java project and packages the project

Create ordinary java project

Open IDEA and click Create New Project

How IDEA creates an ordinary java project and packages the project

idea interface

Select java, and select SDK

How IDEA creates an ordinary java project and packages the project

Choose jdk

Enter the project name and project storage path 

How IDEA creates an ordinary java project and packages the project

Enter project name

Click Finish to create successfully, as shown in the figure:

How IDEA creates an ordinary java project and packages the project

Created successfully

Write a test class

How IDEA creates an ordinary java project and packages the project

Write test class

How IDEA creates an ordinary java project and packages the project
How IDEA creates an ordinary java project and packages the project
How IDEA creates an ordinary java project and packages the project

Put the project into a jar package

Select File --- Project Structure

How IDEA creates an ordinary java project and packages the project

Choose Artifacts

How IDEA creates an ordinary java project and packages the project

Click the + sign and select JAR ----- From modules with dependencies

How IDEA creates an ordinary java project and packages the project

Select item

How IDEA creates an ordinary java project and packages the project

Click OK, the jar file is generated

How IDEA creates an ordinary java project and packages the project

We are not finished yet, we still need to build

Compile through Build, select Build Artifacts

How IDEA creates an ordinary java project and packages the project

Select jar for Build

How IDEA creates an ordinary java project and packages the project

Compilation is complete, the jar package can be seen in the project

How IDEA creates an ordinary java project and packages the project
 
 

Guess you like

Origin www.cnblogs.com/winson-317/p/12684979.html