First, the package
(1) open the project structure, select Artifacts -> + -> JAR -> From modules with dependencies ...
There are the main method to add corresponding category, click ok
(2) Build
Build selected from the main menu -> Build artifacts, there will be a corresponding jar package.
After the build, it will generate two directories, bin, out.
Second, the use
2.1 Project Structure way to add import
Project Structure--Modules--Dependenices--Add导入。
Writing methods use class
2.2 Jar package right on the way to the specified Project
Add to select the next module.
reference