To monitor security access, you can set the java.security.debug
system property, which determines what trace messages are printed during
execution. To view security properties, security providers, and TLS-related
settings, specify the -XshowSettings:security option in the
java command.
To see a list of all debugging
options, use the help option as follows.
MyApp is any Java application. The java
command prints the debugging options and then exits before running
MyApp.
java -Djava.security.debug=help MyApp
Note:
To use more than one option, separate options with a comma.
JSSE also provides dynamic debug tracing support for SSL/TLS See Debugging Utilities.
The following table lists java.security.debug options and links
to further information about each option:
| Option | Description | Further Information | 
|---|---|---|
| all | Turn on all debugging | None | 
| access | Print all results from the  You can use the following options with the  
 You can use the following options with the  
 | |
| certpath | Turns on debugging for the PKIX CertPathValidatorandCertPathBuilderimplementations.You can use the following options with the  
 | |
| combiner | SubjectDomainCombinerdebugging | |
| configfile | JAAS (Java Authentication and Authorization Service) configuration file loading | |
| configparser | JAAS configuration file parsing | |
| gssloginconfig | Java GSS (Generic Security Services) login configuration file debugging | 
 | 
| jar | JAR file verification | 
 Note: Use the System property
 | 
| jca | JCA engine class debugging | |
| keystore | Keystore debugging | 
 | 
| logincontext | LoginContextresults | |
| pcsc | Java Smart Card I/O and SunPCSC provider debugging | 
 | 
| pkcs11 | PKCS11 session manager debugging | |
| pkcs11keystore | PKCS11 KeyStore debugging | |
| pkcs12 | PKCS12 KeyStore debugging | None | 
| policy | Loading and granting permissions with policy file | 
 | 
| properties | java.securityconfiguration file debugging | None | 
| provider | Security provider debugging You can use the  
 | 
 | 
| scl | Permissions SecureClassLoaderassigns | |
| sunpkcs11 | SunPKCS11 provider debugging | |
| ts | Timestamping debugging | None | 
| x509 | X.509 certificate debugging | 
You can append the following strings to the value specified in the java.security.debug system property to print additional information:
+thread: Print thread and caller information+timestamp: Print timestamp informationFor example, to add thread, caller, and timestamp information to all debugging output, set the java.security.debug system property on the command line as follows:
java -Djava.security.debug=all+thread+timestamp MyApp
You can specify the option -XshowSettings:security option in the
java command to view security properties, security providers,
and TLS-related settings. The option shows third-party security provider details
if they are included in the application class path and such providers are
configured in the java.security file.
In addition, you can specify
-XshowSettings:security:<subcategory> where
<subcategory> is one of the following:
all: show all security settings
    properties: show security properties
    providers: show static security provider settings
    tls: show TLS-related security settings