Duplicate :
|
|
Relates :
|
If you create a jar file WITHOUT a ���Main-Class��� manifest field, and you try to run it by java ���jar xxx.jar using Java 7 b147, you get this: Exception in thread "main" java.lang.NullPointerException at sun.launcher.LauncherHelper.getMainClassFromJar(LauncherHelper.java:399) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:463) However if you do the same thing in Java 6, you get this: Failed to load Main-Class manifest attribute from stringbenchmarkmissingmainclass.jar
|