1. 配置程序启动入口
把main方法所在的包设为sources 如果已设置跳过此步。
File => Project Structure => modules
选择 src/ 点击 Sources
2. 配置打包范围和输出路径
File => Project Structure => artifacts
点击 "+" 选择 jar => from modules with dependencies
main class 选择你的main方法启动类,点击OK
删除全部Extracted依赖 只保留 xxx compile output 保存
3. 打包
点击 build => build artifacts => xxx.jar => build
温馨提示:答案为网友推荐,仅供参考