Date: Fri, 16 Dec 2005 17:07:46 -0800 (PST) From: PRITHU <prithula@yahoo.com> To: freebsd-java@freebsd.org Subject: getting IP address of host in FreeBSD Message-ID: <20051217010746.4539.qmail@web52215.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
Dear all, I tried to get the IP address of the host in FreeBSD 5.4 using the getLocalhost() method of the InetAddress class. It gave an UnknownHost exception until I put the entry corresponding to the hostname in the file /etc/hosts. But, this solution is not good enough, since it requires to hard code the IP address and hostname mapping in the /etc/hosts/ file. Does anyone know how to get the IP address of the host by any other means? Thank You, Prithula Dhungel. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051217010746.4539.qmail>