how to find localhost address
How to find IP address of local host from Java program. Java networking API provides method to find IP address of localhost from Java program by using java.net. InetAddress class. Itâs rare when you need IP address for localhost in Java program. Mostly I used Unix command to find IP address of localhost.