Tracing Your Code


Just-In-Time Compilers

Just-In-Time (JIT) compilers wreck havoc with debugging. If your Java Virtual Machine (JVM) uses a JIT compiler, a run-time 2 error won't produce the nice output shown in Figure 12.2, with all the line numbers. Instead, you will get the text (Compiled Code) in all the locations where the line numbers currently exist.

JITs are great for production systems because they let the Java code get performance numbers almost as fast as code compiled to the native hardware. But the extra compiling isn't helpful for debugging, so it is a good idea to turn off JITs during development. You do so by appending the command-line flag - nojit to the execution of the Resin server. For example:

 httpd.exe -nojit 

The flag is passed through the Resin server to the underling JVM.




Mastering Resin
Mastering Resin
ISBN: 0471431036
EAN: 2147483647
Year: 2002
Pages: 180

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net