2,点击Artifacts --> 加号( + ) ---> JAR ---> From modules with dependencies
3, 点击From modules with dependencies 就会弹出 Create JAR from Modules 对话框 ,再点击Main Class 的主函数即可。但是这里我们要讲解一下 JAR files from libraries选项中,第一个选项:extract to the target JAR意思是 打完包后是一个jar包,第二个选项:copy to the output directory and link via manifest 意思是 除了jar包,还有此项目所依赖的其它jar包。