How do I tell Spring Boot which main class to use for the executable jar?

Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.0.1.RELEASE:repackage failed: Unable to find a single main class from the following candidates My project has more than one class with a main method. How do I tell the Spring Boot Maven plugin which of the classes it should use as the main class? 10 Answers 10

“Invalid signature file” when attempting to run a .jar

My java program is packaged in a jar file and makes use of an external jar library, bouncy castle. My code compiles fine, but running the jar leads to the following error: Exception in thread “main” java.lang.SecurityException: Invalid signature file digest for Manifest main attributes I’ve googled for over an hour searching for an explanation … Read more

Running JAR file on Windows

Easiest route is probably upgrading or re-installing the Java Runtime Environment (JRE). Or this: Open the Windows Explorer, from the Tools select ‘Folder Options…’ Click the File Types tab, scroll down and select JAR File type. Press the Advanced button. In the Edit File Type dialog box, select open in Actions box and click Edit… … Read more

Running JAR file on Windows 10

I have made a Jar file, but I cant make it to run by double clicking.It works fine using java -jar name.jar or by making a batch file.I have already reinstalled jdk1.8.0_102, set the JAVA_HOME variable and javaw.exe in the jre folder is already the default program to run it.so how do I make it to run by double clicking?