Java programming for inter-process communication