The Java Communications API is an standard extension, and it does not come with the JDK. You have to download it from the
Sun Developer Network.
Basically what you have to do is to obtain a port from a port identifier...
...and use the port to obtain the Input and Output Streams...
The Book Java IO by Elliote Rusty Harold (published by O'Reilly) has a chapter about it. Give it a look at
Safari I hope this helps.
Regards,
Edwin Dalorzo.