The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.



Posted by Abdul on April 29, 2001 at 9:26 PM

> > I am writing a Bean, to be integrated into an installation s/w
> > that will need to determine the IP address of the Machine/ System
> > on which this software will be run. What is the best way to determine
> > IP address.

> Hi,

> Actually you can make use of the package for this.
> The code snipplet will be like this.

> ...
> InetAddress ia = InetAddress.getLocalHost();
> String ipAddress = ia.getHostAddress();

> This returns a String which has an dotted IP Address representation.

>How can I know all ip of people who has visited my site?thanks


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us