Menu

Can you still use ch.ntb.usb-0.5.9.jar?

Help
2017-09-29
2017-10-01
  • Ronald R Berliner

    I have been trying to get LibusbJava-1_1 to work on both Win7 and Ubuntu 16.04 without success. I have tried both jdk7 and jdk8 on windows and openjdk7 on a VirtualBox Ubuntu 14.04 guest.

    I cannot find anything I have done wrong following the instructions from http://libusb-java.ch/installation/start

    Both the Win7 and Ubuntu installations give errors on starting my application program that are quite similar:

    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: ch.ntb.usb.LibusbJava.usb_error_no(I)I
    at ch.ntb.usb.LibusbJava.usb_error_no(Native Method)

    My priogram uses ch.ntb.usb-0.5.9.jar and the classes exposed there. These classes do not seem to be included in the API that is shown at http://api.libusb-java.ch/

    Hence my question. Should I still be able to use ch.ntb.usb-0.5.9.jar?

    Thank you for your help in advance.

    Any comments would be appreciated.

     
  • Urs Graf

    Urs Graf - 2017-10-01

    No, that won't be possible as the API changed. Please get the new jar file and try again. The linker should be able to successfully resolve all links.

     
  • Ronald R Berliner

    Thank you for the fast reply. I looked at the API for the new libusbjava but do not see how I can transfrer my (big) program over from the classes shown in ch.ntb.usb-0.5.9.jar to the new distro so I am trying to use the libusb-win32-bin-1.2.6.0 distribution.

    This works fine in Win 7. On a Win-10 computer it is not working. However, the ch.ntb.usb-0.5.9. USBView program appears to work with my device just fine.

    The test programs included in the distro: testlibusb.exe and testlibusb-win.exe also both appear to work. This makes it an even bigger puzzle.

    My program hangs on the statement LibusbJava.setConfiguration(jhandle, 1) which returns -5, an error.

    Can I see the code for USBView or perhaps the testlibusb-win source. I assume that these must do a setConfiguration and I could see what I am doing wroing.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.