Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Java™ Troubleshooting Guide for HP-UX Systems: > Chapter 1 Diagnostic and Monitoring Tools and Options

java.security.debug System Property

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The java.security.debug system property controls whether the security checks in the JRE (Java Runtime Environment) print trace messages during execution. This option can be useful when trying to determine why a SecurityException is thrown by a security manager. This system property can be set to one of the following values:

  • access — print all checkPermission results

  • jar — print jar verification information

  • policy — print policy information

  • scl — print permissions assigned by the SecureClassLoader

The access option has the following sub-options:

  • stack — include stack trace

  • domain — dump all domains in context

  • failure — dump the stack and domain that did not have permission before throwing the exception

For example, to print all checkPermission results and trace all domains in context, set java.security.debug to access,stack. To trace access failures, set it to access,failure.

The following example shows the output of a checkPermission failure:

$ java -Djava.security.debug=”access,failure”
Application access denied (java.net.SocketPermission server.foobar.com resolve) 
java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1158)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:253)
    at java.security.AccessController.checkPermission(AccessController.java:427)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031) 
    at java.net.InetAddress.getAllByName0(InetAddress.java:1117) 
    at java.net.InetAddress.getAllByName0(InetAddress.java:1098)  
    at java.net.InetAddress.getAllByName(InetAddress.java:1061)    
    at java.net.InetAddress.getByName(InetAddress.java:958) 
    at java.net.InetSocketAddress.<init>(InetSocketAddress.java:124)
    at java.net.Socket.<init>(Socket.java:178)  
    at Test.main(Test.java:7)
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2009 Hewlett-Packard Development Company, L.P.