public class Test{ InetAddress myIPaddress = null; InetAddress myServer = null; String hostAddress = null; String hostName = null; String Address = null ; String Name = null ; public static void main(String args[]) {
Test mytool; mytool = new Test(); mytool.getAllServerIP(); // System.out.println("Your host IP is: " + mytool.getMyIP()); // System.out.println("The Server IP is :" + mytool.getServerIP()); }