I am a new in networking field and I don't know that how to check our local computer network devices is up or down and This status check using the JAVA code so please help me or give me any example or link..
Unless you follow the Java-ping approach by issuing a
system call, there is no way you can tell whether a
network interface is up or down.
You could call ifconfig (UNIX/GNU Linux) or ipconfig (Windows)
and parse their output the same way (Process) in order to tell if any local
interface is up or down.
All you can do from Java is checking if an IP (v4 or v6) address is reachable.
That means, the address has been configured for a local or remote NIC and
that interface is actually up and running with that configuration.
In case an address (or name) is reachable does not tell you much about the
network interface card where that address is homed.
There can be even multiple addresses configured for one card (multihoming).
If you want to write some kind of net-monitor that checks if endpoints are
available on the network, isReachable() would be your first choice.
If you then want to know more about the services you expect at that address
or name you can go there using a port.
Well known port numbers have been defined here.
When using a port number, e.g. 80 for HTTP, you also should implement some
protocol. Otherwise you might confuse the service .