I just posted a question here: How to get the IP address for remote host using Java
The following code worked with me in the couple of domain names that I tested.
InetAddress inetAddress = InetAddress.getByName("http://www.google.com");
String ipAddress = inetAddress.getHostAddress().toString()'
System.out.println(ipAddress );//prints 66.152.109.61
But I am in doubt. How to get the IP without creating a socket?.
So, before I go to further stages in my code, I just need to make sure from one point: Do I need to create socket in order to get the IP address for a remote host ?