IDEA生成jar工具包

使用IDEA生成jar工具包

  • 使用IDEA生成jar工具包,通过导入的方式在其它项目中使用。
  • 注意:此jar包是非执行jar包,只能作为工具包来使用

打包流程

1.点击 Build --> Build Module 'jar01'

image-20220509195208841.

  • 完成之后会生成 out 目录

image-20220509195624786.

2.点击 File -> Project Structure...

image-20220509195756178.

3.点击 Artifacts -> JAR -> Empty

image-20220509200108664.

  • 然后出现这个界面[这个界面没有操作,只是显示最初页面内容]

image-20220509200321592.

4.修改jar包名 + 创建jar包里的目录结构

image-20220509201711484.

5.点击 + 号 -> File

image-20220509202052570.

6.找到需要打包的class文件,点击文件

image-20220509202558986.

7.基本目录结构图

image-20220509202949543.

8.点击 Build -> Build Artifacts...

image-20220509203202238.

9.点击 tools -> Build

image-20220509203427058.

10.我们终于成功了!!!

image-20220509203818769.

posted @ 2022-10-23 18:04  软柠柠吖  阅读(215)  评论(0编辑  收藏  举报