Hi
I need to find how to get he's own internet ip.
Not the local ip.
Thanks in advance.
Nils O. =?iso-8859-1?Q?Sel=E5sdal?= - 31 Oct 2003 15:53 GMT
> Hi
>
> I need to find how to get he's own internet ip.
>
> Not the local ip.
In java you cannot. Probably if you know what system/os you're on, you
could execute some external program and parse the output, but not
(easily) otherwise.
Anton Spaans - 31 Oct 2003 16:01 GMT
Use this call
InetAddress ipAddr = InetAddress.getLocalHost();
String numericIP = ipAddr.getHostAddress();
It'll work if your TCP/IP properties are configured ok.
-- Anton.
> Hi
>
[quoted text clipped - 3 lines]
>
> Thanks in advance.
Roedy Green - 31 Oct 2003 20:33 GMT
>I need to find how to get he's own internet ip.
for ip lore see http://mindprod.com/jgloss/ip.html
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.