You are currently offline, waiting for your internet to reconnect

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

This article was previously published under Q301483
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
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
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).
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.
  1. Create a file named Nojit.ini, and paste the following code:
    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:
  2. Save the Nojit.ini file to a folder, for example, C:\Xyz.
  3. Create a new String Value in the registry as follows:
    1. 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.
    2. Locate the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Java VM key.
    3. Right-click Java VM, and create a new String Value called DoNotJitList.
    4. 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).
You can also enable or disable the JIT option for the entire application through Microsoft Internet Explorer settings or through the HKEY_CURRENT_USER\Software\Microsoft\Java VM\EnableJIT registry key. For more information about this method, see item 19 in the following Microsoft Knowledge Base article:
168942 Frequently Asked Questions About the SDK for Java
For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:
just in time

Article ID: 301483 - Last Review: 06/14/2006 21:27:02 - Revision: 2.0

  • Microsoft Java Virtual Machine
  • kbcompiler kbfaq kbhowto kbjit KB301483