Error when trying to run .jar file
I've compiled my code into a .jar file using netbeans. But once I try to open the .jar file via command line (java -jar Chat.jar) it returns the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: Main/class
Caused by: java.lang.ClassNotFoundException: Main.class
at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 47)
I think what it's saying is that it can't find the Main.class but I unarchived the .jar and know that the file is in there. Any help would be appreciated. Thanks.
Re: Error when trying to run .jar file
It seems it was some sort of netbeans error because I redid the interface for the program in a new project and it worked perfectly.