[root@localhost java]# java -cp . MyApp.jar
Exception in thread "main" java.lang.NoClassDefFoundError: MyApp/jar
Caused by: java.lang.ClassNotFoundException: MyApp.jar
This is not how you execute a class in a jar file...
If the jar file defines the main class in the manifest, then you can run it like so...
java -cp . -jar MyApp,jar
If the jar file doesn't define the main class, but you know what it is, then you can run it like so...
java -cp .;MyApp.jar mainclass
Henry