Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8134577 Eliminate or standardize a replacement for sun.net.spi.nameservice.NameServiceDescriptor
  3. JDK-8176361

Release Note: Remove the JDK-Internal name service provider interface and default implementation

    XMLWordPrintable

Details

    • Verified

    Description

      Previous JDK releases documented how to configure `java.net.InetAddress` to use the JNDI DNS service provider as the name service. This mechanism, and the system properties to configure it, have been removed in JDK 9
       
      A new mechanism to configure the use of a hosts file has been introduced.
       
      A new system property `jdk.net.hosts.file` has been defined. When this system property is set, the name and address resolution calls of `InetAddress`, i.e `getByXXX`, retrieve the relevant mapping from the specified file. The structure of this file is equivalent to that of the `/etc/hosts` file.
       
      When the system property `jdk.net.hosts.file` is set, and the specified file doesn't exist, the name or address lookup will result in an UnknownHostException. Thus, a non existent hosts file is handled as if the file is empty.

      Attachments

        Activity

          People

            msheppar Mark Sheppard
            msheppar Mark Sheppard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: