JDK-4056768 : InetAddress.getLocalHost() always returns "localhost"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.1.2,1.1.3
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1997-06-05
  • Updated: 1997-10-17
  • Resolved: 1997-10-17
Related Reports
Duplicate :  
Relates :  
Description
This happens in JDK 1.1.1 and JDK 1.1.2
Works OK in JDK 1.1

======================================================================
Another user reports:

Synopsis: InetAddress.getLocalHost() returns "localhost/127.0.0.1"

Description: 
This bug is found in JDK1.1.1 and JDK1.1.2 in STANDALONE apps:

InetAddress.getLocalHost() returns "localhost/127.0.0.1" although
the machine is registerd at the DNS and has a fixed IP (not modem
connected). The problem occures only under Solaris 2.4. On
2.5 all the method fine. This problem does NOT occur under JDK1.1.0
and Solaris 2.4.

antonio.rua@Swiss 1997-07-28:

Similar symptom also seen with JDK 1.1.3 on a SC2000E running Solaris 2.5.1.

When running same applet on other machines, everything works allright,  the
problem appears only on the above mentionned machine...

Comments
WORK AROUND Name: mc57594 Date: 06/04/97 ======================================================================
11-06-2004