Empty - By default debug logging is not enabled
The javax.net.debug system property enables debug logging for Java Secure Socket Extension or JSSE connections make by java applications using the SunJSSE provider. This includes connections made using the SSL or TLS protocols such as HTTPS connections.
The debugging output produced by the javax.net.debug property is not logged to a file. Instead the output is printed to System.out.
Usage Examples
You can combine multiple values in a comma separated list or colon separated list.
-Djavax.net.debug=ssl,handshake,data,keymanager
The above will output (to System.out)
SSL/TLS handshake hex dumps, and keymanager tracing information.
all - prints all JSSE debugging infossl - prints all debugging info related to SSL (or TLS). The following sub options exist within ssl:
record - enable per-record tracing
plaintext - output hex dumps of record plaintextpacket - output raw SSL/TLS packetshandshake - output each SSL/TLS handshake message
data - Hex dump of each handshake messageverbose - verbose handshake message printingkeygen - output key generation infosession - output session infodefaultctx - output default SSL initializationsslctx - enable SSLContext tracingsessioncache - enable session cache tracingkeymanager - enable key manager tracingtrustmanager - enable trust manager tracingHere are some other networking Java system properties:
http.agenthttp.keepAlivehttp.maxConnectionshttps.protocolsjava.net.preferIPv4Stackjava.net.preferIPv6Addressesjava.net.useSystemProxiesjavax.net.ssl.trustStorejdk.net.hosts.filejdk.tls.client.protocolsjdk.tls.disabledAlgorithmsnetworkaddress.cache.negative.ttlnetworkaddress.cache.ttlsun.net.client.defaultConnectTimeoutsun.net.client.defaultReadTimeoutsun.net.inetaddr.ttlJava has supported the javax.net.debug system property since at least version 1.8, support may go back to even older versions of java.
javax.net.debug on StartupYou can set the javax.net.debug java system property during startup of the java runtime using the -D command line argument:
java -Djavax.net.debug=all MyAppMain
You may also be able to specify javax.net.debug via the JAVA_TOOL_OPTIONS environment variable:
JAVA_TOOL_OPTIONS=-Djavax.net.debug=all
javax.net.debug at RuntimeYou can set javax.net.debug at runtime with the following Java code:
System.setProperty("javax.net.debug", "all");
WARNING: Depending on the property and JVM version using
setPropertymay or may not work if the JDK Java class that uses this variable has already been loaded. The value of the javax.net.debug system property may be cached within an internal private static variable of the implementing class.
To read the value of javax.net.debug at runtime, you can use this Java code:
String propertyValue = System.getProperty("javax.net.debug");
if (propertyValue != null) {
System.out.println("javax.net.debug = " + propertyValue);
} else {
System.out.println("javax.net.debug was null");
}