Is there any posiblities to get all IP address in LAN

Hi Helpers....

Me trying to develop a tool for windows..

its existing in windows .. but i want to develop in java for model

like in windowsNet send (tool)

i want to send message to all systems which are all connected in local area networks...

but i cant get all ip address...

so i have to explicitly type remote ip address to send ...

is there any way to get automatically all ip address via java program...

plz help me

my heartfull advance thanks

Message was edited by:

drvijayy2k2

[556 byte] By [drvijayy2k2a] at [2007-11-26 12:33:32]
# 1
Maybe you can have a function that checks all valid IP on your LAN Subnet using InetAddress.isReachable..
dhenjhidza at 2007-7-7 15:47:57 > top of Java-index,Core,Core APIs...
# 2
Get the local machine IP. Use that network portion and try to connect to an open port on the first possible host to the last possible host, add anything that works to a list.That list will then be every active node on the subnet.
watertownjordana at 2007-7-7 15:47:57 > top of Java-index,Core,Core APIs...
# 3
What can i use if i am using JDK 1.4.2 bcouse InetAddress.isReachable is in 1.5 only
hari1427a at 2007-7-7 15:47:57 > top of Java-index,Core,Core APIs...
# 4
You don't need isReachable(). Nobody does really. Just try to connect. If you get an exception on a particular address, forget it.
ejpa at 2007-7-7 15:47:57 > top of Java-index,Core,Core APIs...
# 5

Hi,

you can use this DOS commande: "net view > c:\all.txt", this commande is listing all network hostes and save the list into the file "c:\all.txt", now all you have to do is to exec this commande and read the result file.

Runtime.getRuntime().exec("net view > c:\all.txt");

//now open and read the file, it contains all hostes.

Message was edited by:

kim@sky

Message was edited by:

kim@sky

kim@skya at 2007-7-7 15:47:57 > top of Java-index,Core,Core APIs...