Eclipse: export running configuration

后端 未结 4 959
花落未央
花落未央 2020-11-29 05:26

I wrote a complex Java application with eclipse that uses many .jar libraries included into project folder.

Is there a quick way to export a running configuration of

4条回答
  •  孤街浪徒
    2020-11-29 06:17

    1. Right click on a project in the Eclipse explorer
    2. Export...
    3. Java -> Runnable JAR file
    4. Pick your launch configuration from the drop down
    5. Set the export destination
    6. Optionally, you can export that as an ANT script too

    Done. You get a JAR file you can execute with java -jar yourfile.jar

    Note that if your launcher had command line arguments, they don't get exported, you have to pass them to the java command.

提交回复
热议问题