简体   繁体   中英

no usbJava in java.library.path

I got a .jar file from a code that works on Windows, and I'm trying to run it on Linux, but I keep getting this message, and don't know what to do.

    Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: no usbJava in java.library.path
            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1856)
            at java.lang.Runtime.loadLibrary0(Runtime.java:845)
            at java.lang.System.loadLibrary(System.java:1084)
            at ch.ntb.usb.LibusbJava.<clinit>(LibusbJava.java:366)
            at ch.ntb.usb.USB.init(USB.java:315)
            at ch.ntb.usb.USB.getBus(USB.java:296)
            at ch.ntb.usb.Device.initDevice(Device.java:102)
            at ch.ntb.usb.Device.open(Device.java:222)
            at TransmitterModuleHIDInterface.run(TransmitterModuleHIDInterface.java:28)
            at java.lang.Thread.run(Thread.java:722)

I'm using the Java wrapper for the libusb-0.1 (I followed the installation instructions here ).

Any help would be really appreciated!

You need to create a link to the shared library, as per the Linux installation instructions:

http://libusbjava.sourceforge.net/wp/?page_id=8

If you're having trouble building the shared library this might be of some help:

http://me.opengroove.org/2010/01/libusbjavaso.html

The sources for the library itself is under /libusbjava/trunk/LibusbJava/ in the SVN source tree.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM