Results 1 to 3 of 3
  1. #1
    ecstatic is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default 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$ )
    at java.awt.event.InvocationEvent.dispatch(Invocation
    at java.awt.EventQueue.dispatchEvent( 602)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(
    at java.awt.EventDispatchThread.pumpEventsForFilter(E
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(
    at java.awt.EventDispatchThread.pumpEvents(EventDispa
    at java.awt.EventDispatchThread.pumpEvents(EventDispa
    Caused by: java.lang.ClassNotFoundException: org.jdesktop.layout.GroupLayout$Group
    at$ 217)
    at Method)
    at ava:205)
    at java.lang.ClassLoader.loadClass( 23)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche
    at java.lang.ClassLoader.loadClass( 68)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade
    ... 9 more
    Can anyone plz help me find out the error or suggest any solution?

  2. #2
    ecstatic is offline Member
    Join Date
    Mar 2009
    Rep Power


    The is already contained in the prboject folder. I can run my project in netbeans ide by running;

    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!

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Colombo, Sri Lanka
    Blog Entries
    Rep Power


    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

  1. [SOLVED] Error while running eclipse
    By kimskams80 in forum Eclipse
    Replies: 3
    Last Post: 07-02-2008, 12:31 PM
  2. error while running jar file
    By ernieBob in forum NetBeans
    Replies: 1
    Last Post: 03-25-2008, 12:13 PM
  3. How to find file created date.....
    By roshithmca in forum Advanced Java
    Replies: 1
    Last Post: 02-18-2008, 10:48 AM
  4. NetBeans error
    By michcio in forum New To Java
    Replies: 1
    Last Post: 01-27-2008, 12:09 PM
  5. Replies: 7
    Last Post: 08-12-2007, 04:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts