zoukankan      html  css  js  c++  java
  • Difference between Exporting as s JAR and Exporting as a Runnable JAR

    The runnabel JAR contains a MANIFEST.MF file, which defines the Main class to be executed when the JAR is run.

    Non-runnable JARs are just libraries of classes, that can be added to the classpath so that code is reuable. (It also contains the manifest file, but no main classes there).

    On how to export a JAR file or a runnable JAR file please check the link below:

    http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-37.htm

    Example on how to export a runnable JAR file:

    1. Right Click on the project, and click on Export
    2. Select Runnable JAR file under Java, and click Next
    3. set Lauch configurations to the class which contains the Main function;
      set Export destination; and click Finish

    You can check the JAR file with 7-zip, and the MANIFEST.MF file under META-INF folder.

    It contains the class path to Main function while executing the JAR file.

    Manifest-Version: 1.0
    Class-Path: .
    Main-Class: org.eclipse.jetty.embedded.FileServer
  • 相关阅读:
    LINUX按键驱动程序
    s3c2440地址分配
    Linux内核代码
    C语言初始化
    tftp协议
    ARM工作模式
    Bootstrap3隐藏滑动侧边栏菜单代码特效
    javascript 中slice,substr,substring方法的对比
    vue 的简述
    鼠标移动出自己想要的效果
  • 原文地址:https://www.cnblogs.com/xingzhou/p/6037985.html
Copyright © 2011-2022 走看看