Hi mike,
what is the method you are using for the connection between the client and the server?
If you are using TCP then use the Socket that you get from ServerSocket.accept().
Socket.getInetAddress() will give the InetAddress object.
You can use InetAddress.getHostAddress() to get a
string representation of the IP Address. You can look at the InetAddress class documentation for other useful methods.
If you are using UDP then use the DatagramPacket object you received.
The DatagramPacke.getAddress() will also return an InetAddress object.
Regards,
Amit