Fork me on GitHub

What is usb4java?

usb4java is a Java library to access USB devices. It is based on the native libusb 1.0 library and uses Java NIO buffers for data exchange between libusb and Java. usb4java also supports the javax-usb standard (JSR-80) through the usb4java-javax extension.

Supported platforms are Linux (x86 32/64 bit, ARM 32 bit), OS X (x86 32/64 bit) and Windows (x86 32/64 bit). But other platforms may work as well (as long as they have at least Java 6 and are supported by libusb) by compiling the JNI library manually.

Download

When you are using Maven then you can add the necessary dependencies like this:

<-- For using just usb4java without javax-usb -->
<dependencies>
  <dependency>
    <groupId>org.usb4java</groupId>
    <artifactId>usb4java</artifactId>
    <version>1.2.0</version>
  </dependency>
</dependencies>

<-- For using usb4java with javax-usb -->
<dependencies>
  <dependency>
    <groupId>org.usb4java</groupId>
    <artifactId>usb4java-javax</artifactId>
    <version>1.2.0</version>
  </dependency>
</dependencies>

License

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Getting started

Read the quick start guide and the FAQ. There are also some low-level (libusb) examples and high-level (javax-usb) examples available.

Support

For questions and discussions please use the usb4java mailing list (Google group). You can subscribe to it via email by sending a mail to usb4java+subscribe@googlegroups.com.

If you have found a bug in the software or this web site (even if it's just a typo) then please create an issue on GitHub.