JInput on Windows/Mac for new gaming device....

Hi,

My company is developing a new foot operated gaming device that connects through USB to Windows and Macs machines. We were considering doing the development in C++ because of the unavailability of USB support from Javasoft. However, after quite an amount of time spent searching online, I found JInput.

My question to all those who have used it: is it stable for use in production quality software?
Can we rely on it to access USB smoothly from Windows and Mac?

Of course, will be doing my own testing. Still, much appreciate you input and exprience
with this library. I will post my experience anyways for others to benefit from.

Thanks for reading (and hopefully responding:)
Saad

Oct 31,2010

If the USB device registers itself as a Human Input Device, you should be safe. JInput does little more than exposing the controllers in the system. If (for example) DX can do it, JInput should be able to do it too.

JInput relies on the OS to handle the device, it’s little more than a wrapper around the native code. On OSX this means a HID device, under linux it has to show up in /dev/input/event* and under windows it needs to appear as a raw device and/or a directx device.

HTH

Endolf

Hi,

Thanks all for your responses.

At the time being, it is implemented as a USB-CDC (Communications device control). So, it
appears as a comm port to Windows and all needed is to talk to the comm
port that appears in COM & LPT ports list.

Does the JInput support CDC?

Regards,
Saad

As per my previous post, JInput relies on HID devices on osx, Raw/Directx in windows and /dev/input/event* on linux, it isn’t a general USB handler. It doesn’t handle any other port type, there is a project that handles com ports under windows for Java if I remember correctly.

JInput does have a plugin mechanism, so with some work by an interested party, it could be made to read com ports (virtual or otherwise), but it does make assumptions about what is exposed, e.g. axis, buttons etc.

Endolf

Your best bet, if you want to use Java, is to use the rxtx project:
http://users.frii.com/jarvi/rxtx/
See here for an example:
http://code.google.com/p/pg3b/
Specifically:
http://code.google.com/p/pg3b/source/browse/trunk/Java/src/com/esotericsoftware/controller/pg3b/PG3B.java

Thanks all for your response. Rxtx seems what I was looking for.
Regards.