eclipse-pluginusb4java

i need to use usb4java with eclipse plugin app but when i used USB.Frag.Init(0x04D8, 0x003F, 0x00, 0x81, 0x01, 1);?


this exception occurred

    Exception in thread "Thread-7" java.lang.NoClassDefFoundError: org/usb4java/LibUsbException
    at nattable.NatTableView$USB_Listner.run(NatTableView.java:128)
Caused by: java.lang.ClassNotFoundException: org.usb4java.LibUsbException cannot be found by diagnostictool_1.0.0.qualifier
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 1 more

i included the library already and i can't find what's wrong

build.propeties

http://pastie.org/10746488

Manifest.mf

https://i.sstatic.net/kbYuD.jpg


Solution

  • You must include all the jars that your plugin uses in your plugin and include them in the Bundle-Classpath in the MANIFEST.MF file and list them (or the directory containing them) in the build.properties file.

    You have included a super-csv-2.1.0.jar in your plugin, but you have not included the usb4java jar.