Question

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

Was it helpful?

Solution

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

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top