I used Maven to make dependency and build jar file for my project. I generated the Jar file successfully, but I encountered the following problem:
Error: Could not find or load main class MLSH-0.0.1-SNAPSHOT.Jar
In the configuration of the plugin, you need to specify the main class to be added to the manifest, as described here to make the generated JAR file executable.
<configuration> <!-- ... --> <archive> <manifest> <mainClass>com.whatever.Main</mainClass> </manifest> </archive> <!-- ... --> </configuration>
Also, (unless you changed the default naming of the JAR file containing the dependencies), you need to execute the one that ends with