Question about native 1.4.1, InetAddress.getLocalHost() - bug?

Jan Grant Jan.Grant at
Wed Apr 9 10:36:43 PDT 2003

Should this do what I think it should? When I created a ServerSocket

	s = new ServerSocket(1234, 0, InetAddress.getLocalHost());

I wound up with netstat reporting that I had a TCP connection listening
on From the description of the call, I'd expect
to see it listening on

	s = new ServerSocket(1234, 0, InetAddress.getByName("localhost"));
demonstrates the behaviour I'd expect from the first call.

jan grant, ILRT, University of Bristol.
Tel +44(0)117 9287088 Fax +44 (0)117 9287112
"...perl has been dead for more than 4 years." - Abigail in the Monastery

More information about the freebsd-java mailing list