How to determine the ip-address of my computer (stand alone pc) from another pc. Both are connected to the internet I tried using InetAddress.getByName(my computer name) it works on my pc but not in other pc's
c satya when u get connected to the net ur ISP server will assign u an ip-address right ?? imagine u r connected 2 the internet. Certainly u will have some ip-address assigned by ur ISP. I want 2 determine that address assigned by the server using my java program from my computer. did u get me now ??? any way thanxxx 4 responding...... - Vinod
When the stand alone PC gets connected to the network, the PC is assigned a dynamic IP address ( if the PC is configured so). All you can do is, use java.net.InetAddress.getByName() call to get an InetAddress object and call the getAddress() method on that object. That will give you the eact IP address in byte. Hope this helps your problem. -mo ibrahim
Hi Ibrahim , Saw ur reply. Thanks a lot ! But i have a doubt, u need 2 pass an arguement to the InetAddress.getByName() method (String arguement) what will u pass in the arguement hostname ??? computer name ?? what else ???
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
SKIP - a book about connecting industrious people with elderly land owners