One program I've used in the past is WireShark
, but generally I prefer to use the "standard" Java debug tools, i.e. Eclipse, Netbeans, whatever you use for debugging Java programs. I check the data the source is sending, and then I check for how the receiver is interpreting the data. It's assumed that the data is being transmitted correctly (otherwise there are problems in Java or your network, most likely there aren't), and the only important places to check are the source and destination. Analyzing the data using debug tools is simply much easier than using a packet analyzer like WireShark.