Share this page 

Disable the JIT compiler in Netscape or IE (this howto is deprecated)Tag(s): DEPRECATED

When a JIT is active, Exception don't output the line number where the exception occurs. To retrieve line numbers, simply disable the JIT compiler. With Microsoft IE, simply check the option in the Preferences Dialog. With Netscape v4, rename the DLL jit3240.dll in the directory program/java/bin.

In application, with the Sun JVM, you have the following options:

java -Djava.compiler=NONE myapp
SET JAVA_COMPILER=NONE (Set the environment variable JAVA_COMPILER)
java myapp
With the MS JVM, you set the environment variable MSJAVA_ENABLE_JIT to 0 to disable the Microsoft JIT, or use the Registry key
HKEY_CURRENT_USER\Software\Microsoft\Java VM\EnableJIT
a value of 0 (dword) will disable the JIT.

With the latest JVM this is not necessarily true. To retrieve the line numbers, make sure that the classes are compiled with the debugging infos.

  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info