views:

151

answers:

3

What are Java's native ways of communicating with devices or ports such as LPT1, COM1, USB directly?

A: 

native means unportable, so you have to mess with JNI or JNA if and only if the following libraries doesn't works for you:

dfa
any other ways of doing that by not using any extended libraries?
Joset
No, it's simply not possible without native libraries.
Joonas Pulakka
A: 

RXTX is good one for COM and LPT ports. USB is extremely difficult; probably the easiest way is to write your own C+JNI wrapper for native drivers of the device.

Joonas Pulakka
A: 

Unfortunately, in Javax.comm the sun version 2.0 and the latest RXTX versions -- LPT parallel ports are not implemented properly under Win32. Output seems to work okay, but if you try to read from the port it's not possible.

Paul