It isn't clear from your post exactly what you want to do, or what
/etc/networks contains (I don't have such a file on any of my Solaris or
Linux boxes).
If you just want to read the file, use e.g. an InputStreamReader wrapped
around a FileInputStream.
Depending on what it is you're trying to do, java.net.NetworkInterface
might offer a better solution.
/gordon
Hi gordon
Thanks, sorry for begin ambiguous. The application runs on a solaris
machine with 2 nic.
In /etc/networks, there are 2 entries,
clientside 192.168.1.0
serverside 101.2.4.0
The application suppose to grep clientside from /etc/networks and
broadcast to 192.168.1.0.
I tried using java.net.NetworkInterface.getgetByName("clientside"). It
returns null.
I agreed another approach is using FileInputStream.
It be neater using network classes.
Anyway suggestion
Cheers
T