How to communicate with a USB device under Windows and Java?

Gili picture Gili · Feb 13, 2009 · Viewed 41.2k times · Source

I'd like to communicate with a USB device under Windows and Java but I can't find a good library to do so. I don't want the user to have to install any extra hardware or device drivers to make this work. That is, I want to be able to interact with USB just like other Windows applications do.

I am familiar with jUSB and JSR 80 but both seem to be dead projects (at least for Windows).

Answer

Toybuilder picture Toybuilder · Feb 13, 2009

libusb-win32 requires you to install their generic driver, which then makes a USB device available to you. I'm not sure that it's possible to do driver-less access of an USB device unless the device belongs to one of several standard classes (storage and HID, in particular).

There is a Java wrapper for libusb-win32 which might work for you. I haven't used it myself, though.