0

My code is working fine without any errors when running in Netbeans. If I make a clean build then executing jar file it crashes without any errors visable (swing application).

When I execute the jar file in command line I get this error:

D:\xxx>java -jar ScreenShotUploader.jar
Exception in thread "AWT-EventQueue0"java.lang.NoClassDefFoundError: com/melloware/jintellitype/JIntellitype
    at screenshotuploader.HKRegistering.registerHK(HKRegistering.java:13)
    at screenshotuploader.ScreenShotUploaderJFrame$3.run(ScreenShotUploaderJ
 Frame.java:69)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.melloware.jintellitype.JIntellitype
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 16 more

What is the problem?

Karuvägistaja
  • 293
  • 1
  • 8
  • 17

1 Answers1

3

seems like you are referencing some library. did you tell netbeans to export referenced jars into your jar?

Baz
  • 36,440
  • 11
  • 68
  • 94
  • 1
    i don't use netbeans, but the following link seems to explain it: [LINK](http://www.lampos.net/netbeans) – Baz Jun 16 '12 at 20:07
  • See http://stackoverflow.com/questions/2018257/how-to-combine-library-with-my-jar – jmj Jun 16 '12 at 20:10