28

Is there a good Java USB API i can use? I tried JUSB but it doesn't seem to work. It's also very old, no updates since 2001.

Jonik
  • 80,077
  • 70
  • 264
  • 372
  • Looks like a duplicate of http://stackoverflow.com/questions/644241/how-can-i-use-java-to-communicate-to-device-through-usb-port and http://stackoverflow.com/questions/444497/using-java-and-usb-which-api-jsr-80-jusb – Matthew Flaschen May 15 '09 at 01:02
  • USB communication example through a java application. http://javausbapi.blogspot.com/2010/05/java-usb-api.html Excellent!! –  Jun 01 '10 at 15:33

3 Answers3

2

About two years ago I used Java libusb with success. It has the advantage that you are not limited to special device classes like HID.

Robert
  • 39,162
  • 17
  • 99
  • 152
  • Java libusb looks really old too. It only supports libusb 0.1, while libusb 1.0 has been out for many years and is a lot better. Also, it does not support WinUSB, which is the simplest driver solution for a vendor-specific Windows USB device. – David Grayson Jan 09 '14 at 16:59
1

I used usb4java. On Windows, I installed WinUSB driver and it appeared to work Google: usb4java The advantage is high-level usb api. so the program is virtually portable to different lib. (not only usb4java)

prunge
  • 22,460
  • 3
  • 73
  • 80
Vinh
  • 58
  • 4
1

Try this. It uses JNA so potentially it is more "hackable" than any JNI-based library

dfa
  • 114,442
  • 31
  • 189
  • 228