Results 1 to 2 of 2
- 11-17-2012, 05:41 AM #1
Member
- Join Date
- Nov 2012
- Posts
- 43
- Rep Power
- 0
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.Last edited by DarrylBurke; 11-17-2012 at 10:06 AM. Reason: Marked solved
- 11-17-2012, 07:25 AM #2
Member
- Join Date
- Nov 2012
- Posts
- 43
- Rep Power
- 0
Similar Threads
-
Getting access denied error while importing file using input type="file" with IE7
By sarang1 in forum Advanced JavaReplies: 6Last Post: 02-10-2011, 10:55 AM -
How to log error in sql to log file
By tedy2808 in forum New To JavaReplies: 1Last Post: 08-13-2010, 12:21 PM -
Error after build to jar file.
By bach_meoden in forum AWT / SwingReplies: 13Last Post: 04-06-2010, 03:27 PM -
Jar file error. Please help!
By x2robbie2x in forum New To JavaReplies: 1Last Post: 02-11-2010, 04:19 AM -
File Write Error
By vikain in forum Advanced JavaReplies: 5Last Post: 01-02-2008, 05:38 AM
Bookmarks