Results 1 to 3 of 3
- 03-07-2009, 08:05 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 2
- Rep Power
- 0
error while running jar file created from netbeans
hi to all.I just joined this forum.
I created jar file of my netbeans project and while running it using jar command from the command line , it gives the following error:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group
at javaapplication2.stockmain$1.run(stockmain.java:17 )
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:226)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 602)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:138)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.layout.GroupLayout$Group
at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 23)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 68)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:336)
... 9 more
Can anyone plz help me find out the error or suggest any solution?
- 03-09-2009, 02:32 AM #2
Member
- Join Date
- Mar 2009
- Posts
- 2
- Rep Power
- 0
The stockmain.java is already contained in the prboject folder. I can run my project in netbeans ide by running stockmain.java;
So,it seems some problem i dont know what are there with the netbeans itself. So, i simply created new netbeans project and copied all my source files from old project to new and created jar and when i run it,
lol, it run!
- 03-09-2009, 02:36 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Seems to me you have move the jar file, which is created in dist folder of the project folder, isn't it?
In dist folder there is another folder call lib, which contain all library/packages you have used in your application. If you want to copy your jar file into some other place copy that lib folder too, and keep the same folder structure there.
Before move to the jar file into another location, try to run it on the same location using command prompt as you tried earlier. It should work.
Similar Threads
-
[SOLVED] Error while running eclipse
By kimskams80 in forum EclipseReplies: 3Last Post: 07-02-2008, 11:31 AM -
error while running jar file
By ernieBob in forum NetBeansReplies: 1Last Post: 03-25-2008, 11:13 AM -
How to find file created date.....
By roshithmca in forum Advanced JavaReplies: 1Last Post: 02-18-2008, 09:48 AM -
NetBeans error
By michcio in forum New To JavaReplies: 1Last Post: 01-27-2008, 11:09 AM -
Help with error message when running JAR via HTML file
By Simmy in forum AWT / SwingReplies: 7Last Post: 08-12-2007, 03:47 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks