There is no special way to communicate two Java processes. You will consider them as separate programs and communicate each other. They can communicate over TCP/IP,
RMI,
CORBA.. All requires you to define some communication protocol based on the requirements of the selected technology.