I'm new to java, and I've coded a LEGO project which works in Eclipse.
I've exported the project in a runnable jar and I'm prompted by an error when I run it:
- Code: Select all
C:\>java -jar LegoMindstorm.jar
xception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: lejos/
omm/NXTConnector
at com.mereverzi.LegoConnection.legoConnectionBluetooth(LegoConnectio
va:13)
at com.mereverzi.LegoGUI$1.run(LegoGUI.java:60)
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$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unkno
ource)
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)
aused by: java.lang.ClassNotFoundException: lejos.pc.comm.NXTConnector
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)
I did google the error and to my understanding is due to missing / wrong config of env. variables. I have added folders, even jar files to the environment variables, but it's not working.
What am I missing?
Thank you.
