Re: Local IP address / Java Incompatibility
On Mon, Oct 12, 1998 at 04:18:54PM +0200, Rainer Dorsch wrote:
> We found an incompatibility between Java on Solaris 2.5.1/2.6 and on Debian
> 2.0.r2 Could anybody suggest how to find out, if it is a bug in Debian Linux
> or JDK?
You have to use getLocalHost() on a connected Socket, not on InetAddress to
get the local address of the socket.
Greetings
Bernd
>
> InetAddress inetadr = InetAddress.getLocalHost();
> System.out.println("LocalIP: " + inetadr.getHostAddress());
> System.out.println("LocalName: " + inetadr.getHostName());
>
--
(OO) -- Bernd_Eckenfels@Wendelinusstrasse39.76646Bruchsal.de --
( .. ) ecki@{inka.de,linux.de,debian.org} http://home.pages.de/~eckes/
o--o *plush* 2048/93600EFD eckes@irc +497257930613 BE5-RIPE
(O____O) If privacy is outlawed only Outlaws have privacy
Reply to: