简体   繁体   中英

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

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.)

在此处输入图片说明 在此处输入图片说明


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!)


在此处输入图片说明

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM