Java -D Tracing
Java has many new tracing options for you to determine what is going on in your programming. This makes use of Java's new Dtrace facility that is added to the arguments passed to the JVM at start up time.
Here are some articles about this new facility:
http://www.devx.com/Java/Article/33943
http://www.news.com/8301-10784_3-5685492-7.html
Just add the word -Dtrace. to the java args, followed by the characters that indicates what you want to have traced.
For example:
args=-Dtrace.all (don't forget the dash in front of the D)
Here are some of the possible options. The documentation is a bit sparse for this feature, so you might have to do a bit of experimentation to find those features that will be useful:
| -Dtrace option | Explanation (where available) |
| -Dtrace.all | enables all tracing |
| -Dtrace.appclient | |
| -Dtrace.caller | prints the Class:method caller |
| -Dtrace.ci | |
| -Dtrace.classloader | |
| -Dtrace.cluster | |
| -Dtrace.clusterjrpp | |
| -Dtrace.clustertm | |
| -Dtrace.debug | |
| -Dtrace.deploy | |
| -Dtrace.ejb | |
| -Dtrace.iiop | |
| -Dtrace.invoke | |
| -Dtrace.jca | |
| -Dtrace.jdbc | |
| -Dtrace.jms | |
| -Dtrace.jmsadapter | |
| -Dtrace.jmscc | |
| -Dtrace.jmscore | |
| -Dtrace.jmsgc | |
| -Dtrace.jmsj2ee | |
| -Dtrace.jmssecurity | |
| -Dtrace.jmswrapper | |
| -Dtrace.jmsxa | |
| -Dtrace.jndi | |
| -Dtrace.mdb | |
| -Dtrace.mdbdeploy | |
| -Dtrace.mdbinvoke | |
| -Dtrace.persistence | |
| -Dtrace.security | |
| -Dtrace.servlet | |
| -Dtrace.stackLines=10 | prints 10 stack lines |
| -Dtrace.stackPrefix=java.lang | prints the stack up to java.lang |
| -Dtrace.timeStamp | puts timestamp on all output lines |
| -Dtrace.tm | |
| -Dtrace.usrtrn | |
| -Dtrace.websecurity | |
| -Dtrace.xml |