As adarshr suggested, the JVM cannot find the class because it requires a fully qualified name in the Main-Class attribute of the Manifest file.
In fact, there is no need to specify the main file. You can simply specify your JAR file as your classpath and give the full name of the class to run it with java.
Say your JAR is myJar.jar and the full main file is com.user.Main. Then from the command line go to the directory with your JAR file and give: -
java -classpath myJar.jar com.user.Main
And this will launch the main class. You also need to specify classes (or JARs) in the classpath that are used (imported) in your main class.
See this link for more details.
source share