Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5098413

PIT - InetAddress functionalities not working on IPv6 enabled win XP

XMLWordPrintable

    • mustang
    • x86
    • windows_xp
    • Verified

      Some of the InetAddress functionalities are not working on IPv6 enabled win XP machine.

      Steps to reproduce the problem:
      1. Install IPv6 on a winXP machine by typing 'ipv6 install' on the command prompt.
      2. Compile and execute the source code given below.
      3. The problem will manifest itself

      ------------------BEGIN SOURCE-------------
      import java.net.*;

      public class temp{

      public static void main (String args[]) throws Exception{

      System.out.println(InetAddress.getLocalHost());
      }
      }
      ----------------END SOURCE----------------

      The output below displays the problem on a winXP machine.
      ---------------BEGIN OUTPUT---------------
      [D:/tmp] windows-i586/windows-i586/j2sdk-image/bin/java -showversion temp
      java version "1.6.0-internal"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-internal-Administrator_07_sep_2004_10_23)
      Java HotSpot(TM) Client VM (build 1.6.0-beta-b02, mixed mode)

      jdsn9/10.12.151.177
      [D:/tmp] ipv6 install
      Installing...
      Succeeded.
      [D:/tmp] windows-i586/windows-i586/j2sdk-image/bin/java -showversion temp
      java version "1.6.0-internal"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-internal-Administrator_07_sep_2004_10_23)
      Java HotSpot(TM) Client VM (build 1.6.0-beta-b02, mixed mode)

      Exception in thread "main" java.lang.NullPointerException
              at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1182)
              at java.net.InetAddress.getLocalHost(InetAddress.java:1305)
              at temp.main(temp.java:7)
      [D:/tmp]

      --------------END OUTPUT---------------------

            michaelm Michael McMahon
            kjethisunw Kanishk Jethi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: