Fog Creek Software
Discussion Board




Talking to USB ports on Windows with Java

Hi,

Does anyone know of any implementations that allow communication with a device attached to a USB port for Windows.

The comm API supports serial ports and the JSR for USB support is targetted at Linux.

Walter Rumsby
Sunday, January 25, 2004

Possibility listed at

http://jusb.sourceforge.net/

Scot Doyle
Sunday, January 25, 2004

I think they're only working towards a Linux solution (too).

Going to have a play with serial port emulators for USB. I just bought a "USB to Serial" adapter only to find it's what I would classify as a "Serial to USB" adapter (i.e. serial port is male). Hmm.

Walter Rumsby
Sunday, January 25, 2004

Ah, right in the notes for JUSB there is now Windows support at http://www.steelbrothers.ch/jusb/

Walter Rumsby
Monday, January 26, 2004

I have had a look at that USB stuff for java a while ago, was pretty immature then.

I kind of need to work with the USB port, but often what I find is easiest is to do what you need to do in C, and use JNI to get the result.

What sort of stuff do you need to do with USB? On windows at least there are a plethora of APIs to do what you want with USB, seems a shame to waste them.

I am really waiting for it to be part of j2se core actually. It has to be part of the JVM with a proper standard API, otherwise I think you are best doing what you need to do natively, and have a coarse interface to you java app via JNI

Mike Neale
Monday, January 26, 2004

*  Recent Topics

*  Fog Creek Home