This is an example of how to get the host name of a remote host from its IP address. Doing hostname resolution from IP addresses implies that you should : Retrieve the Address object for the specified host that contains all address related information about the specific host Use the getHostName() and/or getCanonicalHostName() API methods to retrieve the hostname and/or ...
Read More »Home »
Get IP address and hostname from local machine
In this example we shall show you how to retrieve the IP address and hostname from the local host. To get the IP address and hostname from the local machine one should perform the following steps : Retrieve the Address object for the local host. This object contains all address related information about the specific host Use the getAddress() API ...
Read More »Get IP address from hostname
In this example we shall show you how to retrieve the IP address from the hostname of a specific host. To get the IP address using a hostname one should perform the following steps : Retrieve the Address object of the specific host. This object contains all address related information about the specific host Use the getAddress() API method to ...
Read More »