• export a java project to runable jar


    When a java project needs to be transfered to another machine, e.g. vps, we need to export it to a runable jar and then run it directly on a new machine.

    right click project in eclipse, and export to a runable jar. Choose the second Library handling option and set the entry point with a class including main function. After that, we got a jar file and make sure the libraries are declared in MANIFEST.MF file. Then we need to create a empty folder and copy this jar file along with other resource files (e.g. figures, configuration files) into the folder. Now, we can copy this folder to other machine, and run it with the command: java -jar project.jar.

    PS: it is said that if there is no other jar file in the project, then we choose export the java project to a jar. Otherwise, we choose export the java project a runable jar (the library information will be automatically generated in MANIFEST.MF).

  • 相关阅读:
    NC 5的开发环境起不了客户端
    NC 6系初始化EJB
    ubuntu安装javaweb
    html 优化
    ubuntu
    jquery
    前端优化
    京东设计中心
    html cookie
    html5 use video camera
  • 原文地址:https://www.cnblogs.com/yangzhang/p/4065126.html
Copyright © 2020-2023  润新知