I want to fetch default gateway for local machine using java. I know how to get it by executing dos or shell commands, but is there any another way to fetch? Also need to fe
There is currently no standard interface in Java to obtain the default gateway or the DNS server addresses. You will need a shell command.