idea how to create an executable jar package
Choose a main method and type an executable jar.
The first step is to click on the file, and then click on Project Structture
In the second step, select Artifacts and proceed as follows
The third step is to select the main class
The fourth step contains the dependent jars by default, if you need others, you can add them manually; generally, just click "apply" and it's ok.
The fifth step is to compile and pack
The default output jar is in the out folder of the project, and that's the end.