When i run the command java -jar MyJar.jar
i get the following errors :
Exception in thread "main" java.lang.NullPointerException
at sun.launcher.LauncherHelper.getMainClassFromJar(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
What errors are these ? What could be the reason i am getting these errors ?
Before I packed the packages in a jar file the scene was :
Then i packed the above files along with the packages by entering :
jar -cf MyJar.jar .\Design\*.class .\InterfaceImplementation\*.class .\Interfaces\*.class .\messenger\*.class Manifest.MF RemoteMethodImpl_Stub.class
NOTE : When i unpack the jar file there is a folder named META-INF
which also contains MANIFEST.MF
but not the name of main class.
The content of my MANIFEST.MF : Main-Class : messenger.Messenger
also tried by putting a forward slash