1.file,project Structure

使用idea将java程序打包成批处理文件

2.弹出的窗口中左侧选中"Artifacts",点击"+"选择jar,然后选择"from modules with dependencies"。配置主方法

使用idea将java程序打包成批处理文件

3.完成后,点击OK,Apply等按钮,回到IDEA的主菜单,选择“Build - Build Artifacts”下的“Build”或者“Rebuild”即可生成最终的可运行的jar。

4.运行java -jar spiderForAppname.jar /home/xiada/my1.txt /home/xiada/9game1.txt /home/xiada/xiaomi1.txt /home/xiada/huawei1.txt。后面的四个参数是main函数的参数。

具体见https://blog.csdn.net/xuemengrui12/article/details/74984731

相关文章:

  • 2021-11-29
  • 2021-11-20
  • 2021-06-09
  • 2022-01-07
  • 2021-05-31
  • 2021-10-10
  • 2019-09-06
  • 2021-11-28
猜你喜欢
  • 2021-10-09
  • 2021-12-03
  • 2021-12-14
  • 2021-06-26
  • 2021-08-24
  • 2021-06-18
  • 2021-09-03
  • 2021-09-19
相关资源
相似解决方案