@Ulf: I guess, Darryl wasn't asking for ports as in UDP/TCP port but instead wanted to know how to handle serial/parallel ports in Java ;-)
In general that's possible but you'll need a library with some native support. At least I don't know of a pure Java solution. The only library I know for programming serial/parallel ports in Java is
RXTX although I must admit I don't know if this is a very portable solution which works on any platform. Perhaps
you should have a look at the examples and just give it a try.
Marco