My computer is mapped to more than one IP adress. From my program, how can I retrieve all the IP addresses the machine is mapped to?

Alexander K

You can use something like:

          InetAddress ia=InetAddress.getLocalHost();
          InetAddress[] a=ia.getAllByName(ia.getHostName());
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.