Eclipse launch configuration is missing when exporting a Spring boot project to a runnable jar file

Viewed 1593

I have a Spring boot project httpCommonInterface, and have run it in the Eclipse IDE, so I have a launch configuration for it, both in the ide, and on the <workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches folder.(Also I noticed that there is a mismatch between them.)

enter image description here enter image description here


The problem is when I tried to export it to a runnable jar, I can't find that configuration. (They are different for all these three lists!)


enter image description here

Without the configuration I can't export that project. How can I fix this?

1 Answers

Only Java Applications launch configurations are shown in the Runnable Jar dialog.

Even if the Spring boot project has been run as a Spring boot application (and a configration file is created, and we can see the spring boot lunch configuration in the ide), we still cannot export it to a runnable jar file.

So the solution is that we firstly run the Spring boot project as a java application, then its launch configuration is listed.


How to run the Spring boo project as a java application:

  1. right click on the project;

  2. run as-> run configration;

  3. on the left part of the window, choose one instance of Java Application(if none, new one);

    1. config the run configration, like the Project and Main Class in the Project tab.
Related