Article View: borland.public.jbuilder.java.language
Article #14494Re: How to get IP address?
From: Kobus du Toit
Date: Fri, 27 Aug 1999 00:00
Date: Fri, 27 Aug 1999 00:00
31 lines
1292 bytes
1292 bytes
According to the help file: try
java.net.InetAddress
getAllByName
public static InetAddress[] getAllByName(String host) throws
UnknownHostException
Determines all the IP addresses of a host, given the host's name. The
host name can either be a
machine name, such as "java.sun.com", or a string representing its IP
address, such as
"206.26.48.100".
Parameters:
host - the name of the host.
Returns:
an array of all the IP addresses for a given host name.
Throws: UnknownHostException
if no IP address for the host could be found
HooLee wrote:
> Hi! I am HOO.
> How to get IP address of Host?
> Please help me.
> Thank you.
Technical Details
Message-ID:
<37C66E8B.A3AF363D@iname.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7q4sc1$pk418@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,3b55214778b26cd,start X-Google-Attributes: gidf74b3,public From: Kobus du Toit <battlezone@iname.com> Subject: Re: How to get IP address? Date: 1999/08/27 Message-ID: <37C66E8B.A3AF363D@iname.com> X-Deja-AN: 517747986 Content-Transfer-Encoding: 7bit References: <7q4sc1$pk418@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: battlezone@iname.com Newsgroups: borland.public.jbuilder.java.language