Javacomm -- Serial and Parallel port access for Java and xPL

Java as a platform has many great interfaces to make writting programs that run anywhere possible.  However, one place (of a few) I feel they slipped up was in accessing serial and parallel ports.  Sun has produced the Javacomm package to allow Java to access these ports, but it's not part of the core Java download.  This means you have to download and install it yourself.  Worse, not all platforms have a Javacomm implementation yet.

What this page provides it a launching point for various Javacomm distributions.  Select the one appropriate for your platform and you should be good.  If you know of a Javacomm distribution for a platform not covered here, please send me email at gerry@xPL4Java.org

Platform Reference/Download Site
Windows http://java.sun.com/products/javacomm/downloads/index.html  See notes below for details on installing this.
NOTE: As of Nov 21, I've been informed there is no Javacomm download available for Windows at the Sun site.  They released a new version of the API, but only with Linux/Solaris Drivers.  I cannot find any older versions to download.  I'm working on trying to find access to it again, but right now, we're out of luck.  If you can't find it (or you have info on it), please contact me via email.

UPDATE: I cannot get any info from anyone at Sun about a windows port, so for the moment, I'm hosting a copy of the distribution for windows here. If I receive word from Sun they'd rather I didn't do this, I will immediatly take it down. As soon as there is a Windows port downloadable from the Sun sites, I'll also take this down.

Linux http://stpaulterminal.org/software/jmri/
Solaris http://java.sun.com/products/javacomm/downloads/index.html


NOTES For Windows users:
The distribution Sun provides has everything you need, but the way they tell you to install it is sort of screwed up.  They want you to have to explicitly add support for Javacomm to every Java app when you run it -- a true pain in the backside.  With a small change, you can set it up so all Java apps have automatic access to Javacomm.

The key is to follow their directions EXCEPT on where to put javacomm.jar.  They suggest you put it in the lib\ directory of your Java install.  Instead, put it in the lib\ext directory (one level down from lib) and Java will automatically load it in at startup.  Viola!

NOTES for Linux/BSD users:
While the specified download talks about RXTX (the Linux javacomm implementation) and JMRI, I've found it to be a pretty good overview of installing the RXTX/Linux Javacomm and would suggest following it's direction. I'd also recommend building it from source. It builds very quickly, is easy and as long as JDK_HOME or JAVA_HOME points to your Java JDK install, handles all the details. Just ignore anything about JMRI (it's not needed)

NOTES for Solaris:
I don't have any -- I suspect it's pretty easy.  However, if you find that Java doesn't seem to know about javacomm, you may want to try a variation of the notes for Windows installs.

NOTES MacOSX:
I don't have any info on a javacomm implementation for OSX (I don't even know if OSX has serial and parallel ports, but I suspect it does).  If you find anything out, please let me know.  It's *likely* (but not a guarantee) that the Linux version may successfull compile and install under OSX.  Worht a try, at least until there is an official Javacomm release for OSX.

Page last updated November 21, 2005