If you have many address, you can obtain all :

InetAddress[] e = InetAddress.getAllByName(InetAddress.getLocalHost().getCanonicalHostName());