File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
Sockets and Internet Protocols
Problem getting local ip address
Tien Duong Nguyen
Joined: Oct 22, 2004
Jan 09, 2005 03:50:00
Anybody knows how to get the computer ip address by using
I have tried to use the method getInetAddress of
class, but it always returns me the address 0.0.0.0. What I want is the computer static ip address or DHCP , e.g : 184.108.40.206
Really appreciate if anyone can help.
SCEA (part 1), part 2,3 in progress<br /> <br />SCBCD,SCWCD,SCJP
Joined: Aug 07, 2003
Jan 10, 2005 04:03:00
InetAddress local = InetAddress.getLocalHost();
I agree. Here's the link:
subject: Problem getting local ip address
Capturing IP address of the client machine
How to allow only some computers to access the web application in internet?
get the IP Address
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015