Create ordinary java project
Open IDEA and click Create New Project
Select java, and select SDK
Enter the project name and project storage path
Click Finish to create successfully, as shown in the figure:
Write a test class
Put the project into a jar package
Select File --- Project Structure
Choose Artifacts
Click the + sign and select JAR ----- From modules with dependencies
Select item
Click OK, the jar file is generated
We are not finished yet, we still need to build
Compile through Build, select Build Artifacts
Select jar for Build
Compilation is complete, the jar package can be seen in the project