I dont think you are asking about
java api, right?.
Socket which is created when client connects to the server can give you the client's address.
Or your query is finding address of a computer which is connected to network, irrespective of whether it had made a request or not. If that is so
http://jcifs.samba.org/ may help