Fairly new to Java here and I'm trying to create a project in Java that uses USB devices. I think I have covered all the dependencies as the example DumpDeviceTree doesn't give me any errors in NetBeans. However, when I try to run the program I get the following errors:
Exception in thread "main" java.lang.NoClassDefFoundError: org/usb4java/Loader
at org.usb4java.javax.Services.<init>(Services.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at javax.usb.UsbHostManager.createUsbServices(Unknown Source)
at javax.usb.UsbHostManager.getUsbServices(Unknown Source)
at DumpDeviceTree.main(DumpDeviceTree.java:43)
Caused by: java.lang.ClassNotFoundException: org.usb4java.Loader
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
Java Result: 1
As I am new to usb4java, I don't have a clue what this all means. If someone could provide some hints I would appreciate it. Thanks.
JC