Eclipse: export running configuration

后端 未结 4 936
花落未央
花落未央 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:08

    Exporting:

    1. Go to File > Export... > Run/Debug > Launch Configurations
    2. In the dialog select all or what you want
    3. Set the filename

    Importing:

    1. Go to File > Import... > Run/Debug > Launch Configurations
    2. In the dialog select all or what you want
    3. Set the filename
    0 讨论(0)
  • 2020-11-29 06:17

    You can get the full command executed by your configuration on the Debug tab, or more specifically the Debug view.

    1. Run your application
    2. Go to your Debug perspective
    3. There should be an entry in there (in the Debug View) for the app you've just executed
    4. Right-click the node which references java.exe or javaw.exe and select Properties
    5. In the dialog that pops up you'll see the Command Line which includes all jars, parameters, etc
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-11-29 06:27
    • Starting with File menu
    • File -> Export Expand "General" node
    • Choose "Ant Buildfiles" Press "Next"
    • You will get a list of projects,
    • choose the project you wish to use. Press
    • "finish" button As a result,
    • you would get an ANT build file, which will have targets that points to your "Run configurations" for the given project.

    Now, to run a run configuration "run-config-1" you may type on your command line (Assuming you have ant on your shell's PATH)

    ant run-config-1
    
    0 讨论(0)
提交回复
热议问题