Questions tagged [usb4java]

usb4java is a Java library to access USB devices.

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.

Source: http://usb4java.org/

69 questions
0
votes
1 answer

how to read & write my usb device data using usb4java

I want to read and write sandisk usb data using usb4java lib in java. i can get usb device list. but i don't know how to read my usb data. This is my dump usblist code. { // Create the libusb context Context context = new Context(); //…
0
votes
2 answers

Printing from raspberry pi via usb4java

Thank you in advance for reading this! I am using a java app to send bytes through the usb interface to an EPSON TM-T88V receipt printer using esc/pos commands The behaviour is different when executed on the raspberry pi compared to when executed on…
spxcxlxxs
  • 57
  • 8
0
votes
1 answer

org.usb4java.LoaderException: Native library not found in classpath error

Am an trying to use the usb4java library with a project running in Ubuntu 64bit. I am getting the following error; 30 Jul 2015 09:46:16,225 INFO Controller : Working Directory: /opt/dock Exception in thread "main"…
Phil
  • 1
  • 3
0
votes
1 answer

How to use usb4java to read two scanners at the same time?

I have 2 barcode scanners and I need to read the data from the scanner. How can I know which data comes from which scanner? As I know the scanners are auto config to a keyboard and I am using windows 8.
Fai Fabio
  • 19
  • 5
0
votes
1 answer

Try to use usb4java highlevel librairie

So here it is my program: public static void main(String[] args) { UsbServices services = null; try { services = UsbHostManager.getUsbServices(); hub = services.getRootUsbHub(); } catch (SecurityException | UsbException…
0
votes
2 answers

Use of "USB4JAVA.jar" to get information about attached devices in linux

I google about getting information of USB attached to linux OS and found that USB4JAVA is very helpful to do the same. I found sample code as below. Now after running it i got Exception of "java.lang.ExceptionInInitializerError". Code that i used…
0
votes
1 answer

How to solve error message Exception in thread "main" java.lang.NoClassDefFoundError: org/usb4java/Loader

I'm trying to make use of usb4java and am getting a error when I run it. It compiles just fine and I have looked at my class path and it appears the usb4java jars are being included as you can see below. I'm currently on Windows 7, running Java 8,…
Kuberchaun
  • 29,160
  • 7
  • 51
  • 59
-1
votes
1 answer

I can't figure out this barcode scanner's encoding

I'm making an application in Java that is meant to run on my Raspberry Pi. It uses usb4java to detach the kernel's driver and give me its data directly. The scanner itself works like a keyboard. When it detects something, it sends it with a…
HydroPage
  • 121
  • 12
-1
votes
1 answer

JNI Dependencies and cross-platform build

I'm currently working for a project for which I need to detect whether an Oculus device is plugged or not. I do so using the usb4java library usb4java. org.usb4java usb4java-javax
Lucas
  • 21
  • 3
1 2 3 4
5