General

What is RXTX?

RXTX is a Java library, using a native implementation (via JNI), providing serial and parallel communication for the Java Development Toolkit (JDK). All deliverables are under the GNU LGPL license. It is based on the specification for Sun's Java Communications API, though while many of the class descriptions are the same the package used it not, since gnu.io is used instead. A certain amount of compatibility is intended with API, though this project should be considered as a fork and therefore compatible in spirit, but not in implementation.

Is there a Change Log?

What License does RXTX use?

RXTX is license under the LGPL with an exception for linking over controlled interfaces, a copy of which can be found in the 'License' page. The exception allows people to use RXTX as a service plugin with Sun's CommAPI: 'A Controlled Interface.'

What Platforms does RXTX run on?

Problems and Workarounds

On MacOS X I get a 'PortInUseException', even though it isn't?

Versions prior to 2.1-8 use lock files, which is not the MacOS X way of doing things, and therefore has issues. For this reason make sure that you have version 2.1-8 or higher, which makes use of I/O Kit. At this point in time 2.1-8 is only availble from CVS, in source form. See the section Retrieving Source Code, on getting the latest code - be sure to get the code from the 'gnu.io' branch.

RXTX does not find my device, what's wrong?

There may be a number of reasons, but most often it is because your operating system can't find it either. RXTX is built upon the functionality provided by your operating system, and therefore is dependent on its limitations. For this reason find out whether your system can find the port, if it can and you still can't work what is going on, then there may be some help on the Mailing-List.

You can specify the available ports by

System.setProperty("gnu.io.rxtx.SerialPorts", portFileNames);

where the file names of the ports are separated by File.pathSeparator.

RXTX installation fails with JDK 1.6

This applies to the source package of RXTX 2.1-7r2.

After having run ./configure; make; make install, the following message appears:

This is caused by a missing case in the 'configure' script generated from 'configure.in', which
causes the variable RXTX_PATH to not be set which causes the above confusion.
You can change the 'configure' script directly. Look for the case instruction that matches JDK version strings:

1.2*|1.3*|1.4*|1.5*

and extend it to

1.2*|1.3*|1.4*|1.5*|1.6*

Note that there are matches for Linux, BSD, Solaris and Win32.

Then run ./configure; make; make install as usual.

RXTX and the Equinox SST-4P/LP multiport card

A note for those who want to install an Equinox board (in this case "SST-4P/LP") and try to
run it with RXTX under Linux (in this case, Red Hat ES 4)

Is there a way to access serial and parallel port with standard Java API ?

Currently no. This includes all Java versions including JDK 1.6 and probably JDK 1.7 when it is released. The Java Communications API is a Java extension providing the necessary support for serial and parallel communication. RxTx is the most complete and currently maintained implementation of this API.