Microsoft KB Archive/301483

From BetaArchive Wiki
Knowledge Base


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.

  1. 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]
    *
                        
  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).


REFERENCES

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:


Additional query words: just in time

Keywords: kbhowto kbjit kbfaq kbcompiler KB301483