-
Shift
+Ctrl
+Alt
+s
Open the following window, selectArtifacts
:
DBUtil here is the jar package I used for testing, it should be nothing normally -
In the picture above, I found the
+
number above the DBUtil test . Click it! Then selectJAR
->From modules with dependencies...
-
In
Main-Class
the input method Main inlet class (where the main function class). You can choose from the icons of the following folders.
The path below indicates the location of the META-INFO file required by the component jar package . Can be changed
If there is more than one module under your project and only one module is exported this time, Module
change it at
4. Next, you can change the name, storage path and other information of the jar package on the right. Then if the program has a dependency package, +
click it at the bottom of this picture !
5. Select the first item: Library Files
6. Select the external jar package you need, Apply
-> OK
you can generate the files needed to export the jar package
- Next, export the jar package, go back to the main IDEA window, and find it in the top toolbar
Build
:
- Select the package name you just created ->
build
:
Wait for IDEA to form. After the end, you can find the jar package in the file path configured in step 4