In my unix vm, I can give the following entry in /etc/hosts
ABC_XYZ_HOSTNAME.abc.com 15.115.112.*** and after that I can "ping ABC_XYZ_HOSTNAME.abc.com
" successfully. But my code is breaking at
InetAddresses.forString(ip)
with exception, IllegalArgumentException with IP string literal is not valid.
So the question is, is underscore supported hostname or something else is wrong here?