Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2003

Tip: Looking for answers? Try searching our database.

[Network] How to get Internet IP

Thread view: 
Alexandre Jaquet - 31 Oct 2003 15:22 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.