第一步:

确定Modules下添加了第三方的jar。Idea下打包成可运行jar(含第三方jar)

第二步:

Idea下打包成可运行jar(含第三方jar)

第三步:

点击“Create Maniftest...”,选择项目的目录

Idea下打包成可运行jar(含第三方jar)

第四步:

选择main class

Idea下打包成可运行jar(含第三方jar)

第五步:

name:可以随便起,选中“项目名字 compile output”右键,put into output root。

Idea下打包成可运行jar(含第三方jar)

右键“lib” Extract into output root

Idea下打包成可运行jar(含第三方jar)


最后点击ok,build >Build Artifacts... ,在上图 output directory 的路径中找到生成好的test.jar 。shift 右键,在此处打开命令窗口。输入java -jar test.jar.

相关文章:

  • 2021-06-29
  • 2022-12-23
  • 2022-02-12
  • 2021-12-02
  • 2021-06-16
  • 2021-06-24
  • 2021-05-07
猜你喜欢
  • 2022-02-08
  • 2022-01-10
  • 2022-01-07
  • 2021-09-16
  • 2021-06-20
  • 2022-12-23
  • 2021-09-19
相关资源
相似解决方案