Re: How can I find the IP address of the local PC ?
- From: Joseph Dionne <jdionne@xxxxxxxxxxx>
- Date: Mon, 05 Dec 2005 18:19:10 GMT
Starting in JDK 1.4 you can use NetworkInterface to enumerate all IP addresses on your server.
Arne wrote:
Hi,
Probably an easy answer to this, but I have not been able to figure it out.
How can I find the IP-address of the machine that my Java-program is running on ? Could not find any methods in the InetAddress class that does this. The closest I got was the getLocalHost() which will return the IP-address representing the loopback address (usually 127.0.01, isn't it ?).
Any ideas ?
Regards Arne
.
- Prev by Date: map logical Dialog Font
- Next by Date: Detecting virtual IP addresses
- Previous by thread: map logical Dialog Font
- Next by thread: Detecting virtual IP addresses
- Index(es):
Relevant Pages
|