Java: Convert a String (representing an IP) to InetAddress [duplicate]

Simply call InetAddress.getByName(String host) passing in your textual IP address.

From the javadoc: The host name can either be a machine name, such as “java.sun.com”, or a textual representation of its IP address.

InetAddress javadoc

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)