zoukankan      html  css  js  c++  java
  • eclipse export runnable jar

    如果要导出可运行的JAR文件,需要选择Runnable Jar File。

    方法/步骤

     
    1.  

      1. 选择要到处JAR文件的工程,右键选择“Export”;

      eclipse export runnable jar
    2.  

      2. 选择“Java-->Runnable JAR file”,点击“Next”;

      eclipse export runnable jar
    3.  

      3. 在“Launch configuration”下面的下拉列表中选择程序启动时运行的主类;

      在"Export destination"下面的“Browse”按钮选择JAR的存放路径,并输入JAR文件名;

      如果程序依赖于其它包,就在“Library handling”处选择“Package required libraries into generated JAR”或“Copy required libraries into a sub-folder next to the generated JAR”,如果选择后者,则导出时,会将需要的包拷贝到一个目录中,后面引用这个JAR包时,必须将这个目录拷到JAR包所在的目录。

    4. 4

      4.关于library handling部分的解释如下:

      (1)Extract required libraries into generated JAR。

      把所有的import JAR都拆开来,包含在JAR的各个目录中,ex. net/org/xxx.class

      (2)Package required libraries into generated JAR。

      把所有的import JAR都包在JAR的根目录下

      (3)Copy required libraries into a sub-folder next to the generated JAR。

      把所有import JAR放在JAR外面独立的一个文件夹

      from https://jingyan.baidu.com/article/d5a880eb6f1e7d13f147cc20.html

  • 相关阅读:
    背水一战 Windows 10 (90)
    背水一战 Windows 10 (89)
    背水一战 Windows 10 (88)
    背水一战 Windows 10 (87)
    背水一战 Windows 10 (86)
    背水一战 Windows 10 (85)
    背水一战 Windows 10 (84)
    背水一战 Windows 10 (83)
    背水一战 Windows 10 (82)
    背水一战 Windows 10 (81)
  • 原文地址:https://www.cnblogs.com/shizhijie/p/9150336.html
Copyright © 2011-2022 走看看