That is a very open-ended question since so many Java tools are available for communication. Think about these questions: How much data? How often? Connected by local network or Internet or what? What security concerns? How is communication initiated?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com