The easiest way is set up a simple client/server. One of the programs creates a ServerSocket, then the other connects via Socket. Then set up IO streams(what to use depends on the type of data) and you are set. You will have to decide whether to use TCP or UDP. Network programming is an intermediate topic that is deep, luckily
Java abstracts
alot of the details for you, but it is still good to know the underlying basics.
Check out the 2 classes in the API and there should be a basic socket tutorial at java.sun.com.
[ April 24, 2006: Message edited by: Rusty Shackleford ]