See Network System Properties
for a list of system properties used to alter the mechanisms and
behavior of the various classes of the java.net
package.
These properties may not be supported in future releases.
sun.net.inetaddr.ttl
This is a Oracle JDK private system property that corresponds to
networkaddress.cache.ttl
. It takes the same
value and has the same meaning, but can be set as a command-line
option. However, the preferred way is to use the security property
networkaddress.cache.ttl
.
sun.net.inetaddr.negative.ttl
This is a Oracle JDK private system property that corresponds to
networkaddress.cache.negative.ttl
. It takes the
same value and has the same meaning, but can be set as a
command-line option. However, the preferred way is to use the
security property networkaddress.cache.negative.ttl
.
sun.net.client.defaultConnectTimeout
(default:
-1
)
sun.net.client.defaultReadTimeout
(default:
-1
)
These properties specify the default connect and read timeout, respectively,
for the protocol handler used by java.net.URLConnection
.
sun.net.client.defaultConnectTimeout
specifies the timeout (in
milliseconds) to establish the connection to the host. For example
for HTTP connections, it is the timeout when establishing the
connection to the HTTP server. For FTP connections, it is the timeout
when establishing the connection to FTP servers.
sun.net.client.defaultReadTimeout
specifies the timeout (in
milliseconds) when reading from input stream when a connection is
established to a resource.
sun.net.http.retryPost
(default: true
)
It determines if an unsuccessful HTTP POST request will be
automatically resent to the server. Unsuccessful in this case means
the server did not send a valid HTTP response or an IOException
occurred.
These properties may not be supported in future releases.
sun.net.spi.nameservice.provider.<n>=<default|dns,sun|...>
Specifies the name service provider that you can use. By
default, the JDK will use the system configured name lookup mechanism,
such as file
, nis
, etc. You can specify your own by setting this
option. <n>
takes the value of a positive number. It
indicates the precedence order. A smaller number takes higher
precedence over a bigger number. Aside from the default provider,
the JDK includes a DNS provider named dns,sun
.
Providers are chained, which means that if a lookup on a provider fails, the next provider in the list is consulted to resolve the name.
sun.net.spi.nameservice.nameservers=<server1_ipaddr,server2_ipaddr
...>
You can specify a comma-separated list of IP addresses that
point to the DNS servers you want to use. If the
sun.net.spi.nameservice.nameservers property
is not defined, then
the provider will use any name servers already configured in the
platform DNS configuration.
sun.net.spi.nameservice.domain=<domainname>
This property specifies the default DNS domain name, for
instance, eng.example.com
. If the sun.net.spi.nameservice.domain
property is not defined then the provider will use any domain or
domain search list configured in the platform DNS
configuration.