Microsoft KB Archive/301483

= How To Turn Off JIT Compiler for a Particular Method or Set of Methods =

Article ID: 301483

Article Last Modified on 6/14/2006

-

APPLIES TO


 * Microsoft Java Virtual Machine

-



This article was previously published under Q301483



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SUMMARY
This article describes how to turn off the just-in-time (JIT) compiler option for a specific method or set of methods while you are using the Microsoft virtual machine (Microsoft VM).



MORE INFORMATION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Step-by-Step Example
The following example disables the JIT option for the hashCode method in the java/lang/String class.   Create a file named Nojit.ini, and paste the following code: [java/lang/String] hashCode where the Java package name and class name are enclosed in brackets and followed by the method name.

You can add any number of methods of the specified class after the class name to turn off the JIT option. You can also use an asterisk (*) instead of the specific method name(s) to disable JIT for all methods in the specified class. For example: [java/lang/String]  Save the Nojit.ini file to a folder, for example, C:\Xyz. Create a new String Value in the registry as follows:  From the Microsoft Windows Start menu, click Run, and type regedit.exe (for Windows NT-based computers) or regedt32.exe (for Windows 2000-based computers) to open Registry Editor. Locate the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Java VM key. Right-click Java VM, and create a new String Value called DoNotJitList.</li> Double-click the DoNotJistList value. In the Value Data text box, specify the path to the Nojit.ini file where you saved the file earlier (for example, C:\Xyz\Nojit.ini ).</li></ol> </li></ol>

<div class="references_section">