在Eclipse下创建可执行的Jar文件 [英] Create executable Jar file under Eclipse

查看:321
本文介绍了在Eclipse下创建可执行的Jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Java应用程序,并且想为此应用程序创建jar文件。该应用程序通过构建路径>添加外部Jar文件导入了其他外部jar文件。
如何在具有这些外部库依赖项的Ubuntu中为此应用程序生成可执行JAR文件?

I created a Java application and I want to create jar file for this application. This application imported other external jar files by Build Path>Add External Jar File. How can I generate executable JAR file for this application in Ubuntu with these external libraries dependencies?

推荐答案

要创建一个工作台中新的可运行JAR文件:

To create a new runnable JAR file in the workbench:


  1. 从菜单栏的文件菜单中,选择导出。

  2. 展开Java节点,然后选择Runnable JAR文件。单击下一步。

  3. 在可运行的JAR文件
    规范页面中,选择一个 Java应用程序启动配置
    来创建可运行的JAR。

  4. 在导出目标字段中,键入或单击浏览到
    ,选择JAR文件的位置。

  5. 选择适当的库处理策略。

  6. (可选)您还可以创建ANT脚本,以快速重新生成先前创建的可运行JAR文件的
    a。

  1. From the menu bar's File menu, select Export.
  2. Expand the Java node and select Runnable JAR file. Click Next.
  3. In the Runnable JAR File Specification page, select a 'Java Application' launch configuration to use to create a runnable JAR.
  4. In the Export destination field, either type or click Browse to select a location for the JAR file.
  5. Select an appropriate library handling strategy.
  6. Optionally, you can also create an ANT script to quickly regenerate a previously created runnable JAR file.

这篇关于在Eclipse下创建可执行的Jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆