Showing all IP Address(es)

Dear guys,

Can you please help me ? I want to display all the IP Address(es) (means includes all the aliases) of other machine.

This is my code :

privatevoid getOtherIP(InetAddress ia)

{

NetworkInterface networkInterface=new NetworkInterface(ia);

try

{

Enumeration e=(NetworkInterface.getByInetAddress(ia)).getNetworkInterfaces();

while(e.hasMoreElements())

{

NetworkInterface ni=(NetworkInterface)e.nextElement();

Enumeration en=ni.getInetAddresses();

while(en.hasMoreElements())

{

InetAddress i=(InetAddress)en.nextElement();

Vector_IP.addElement(new String(i.getHostAddress()));

}

}

}

catch(SocketException ex)

{

ex.printStackTrace();

}

}

but when I want to print the vector, it returns the IP Addresses of my own machine, not the one with "ia" InetAddress.

Thank you

[1458 byte] By [Thunder_Blasta] at [2007-11-26 17:18:48]
# 1
That's all it can do. You can only discover IP addresses of other hosts via DNS.
ejpa at 2007-7-8 23:46:47 > top of Java-index,Core,Core APIs...