There is no configuration needed for the XBee modules to perform this function. This is more of a question on how you write your applications to send and receive data via a COM port. That is something that is not for this forum but for your Arduino processor forum and Microsoft's forums for Java.