Re: How can I find the IP address of the local PC ?



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


.



Relevant Pages

  • Re: Enumerate volumes on a server
    ... To enumreate volumes the server is offering or sharing via a NAS protocol, ... To enumerate volumes attached to the server, ... Use your favorite search web site and you should find plenty of WMI scripting examples. ...
    (microsoft.public.windows.file_system)
  • Re: Pen-Testing New Server - Where to start?
    ... For example, you can enumerate services ... attacker gets access) you could smoke a joint (thinking higher, ... running on the HTTP port) and try to exploit them. ... penetration-testing a new server I've set up at home. ...
    (Security-Basics)
  • ASP.NET site hangs when schtasks /v switch is invoked
    ... will enumerate the scheduled tasks on a certain server. ... However, when I tack on a /v switch to the end of that, the site hangs ... fine from a command prompt against remote servers so it is something to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Health Monitor Alerts
    ... Health Monitor Messages in Server Status: ... NetworkInterface: Critical Condition. ... "Chewang Dorji" wrote in message ... > Data Collector: System Processor Use ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: Get SQL Server version of each instance installed
    ... There must be an SQL query (when you connect to the default ... The problem is that I don't know how many instances each server is ... ' Enumerate account balances. ...
    (microsoft.public.windows.server.scripting)