I want to lookup in my system (using java) for all network cards and network interfaces. So, more exactly, I want to get the whole output from ifconfig command (in
ifconfig
You can use Runtime.getRuntime().exec("ipconfig") for Windows and Runtime.getRuntime().exec("ifconfig") for linux to get ifconfig result in java
Runtime.getRuntime().exec("ipconfig")
Runtime.getRuntime().exec("ifconfig")
There is no way to get to the gory details here in 100% Java. You can either execute commands or write JNI.