Microsoft SDK for Java

Enabling Profiling with Environment Variables

The preferred method for enabling profiling is to set special environment variables in the Win32 process to be profiled before starting the Microsoft VM (before launching Microsoft® Internet Explorer, for example), and then executing the Java application or applet. Note that the value of these environment variables (when set) override the equivalent settings in the registry.

Profiler Environment Variables

Environment variable Description and values
MSJAVA_ENABLE_MONITORS Enables event monitors when set to a non-zero value before the Microsoft VM begins execution. This value defaults to off.
MSJAVA_EVENT_MONITORS A semicolon-separated list of CLSIDs of event monitors that should be connected to the Microsoft VM in this Win32 process. The Microsoft VM will load all the monitors listed in this environment variable in addition to all the event monitors listed in the registry as subkeys of the HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM\Monitors registry key.
MSJAVA_DEBUGGING_FLAGS A hexadecimal bitmask of debugging flags that primarily affect debugging with the Microsoft VM. One of the bit flags in this mask, MSJDBG_FL_ENABLE_PROFILING (0x02), enables event monitors when it is set before the Microsoft VM begins execution. However, the preferred technique for enabling event monitors in a Win32 process is using the MSJAVA_ENABLE_MONITORS environment variable.
MSJAVA_ENABLE_FI Enables the fast interpreter when set to a non-zero value. If this environment variable is not set and the equivalent registry value is not set, the fast interpreter is enabled by default.
MSJAVA_ENABLE_JIT Enables the JIT compiler when set to a non-zero value. If this environment variable is not set and the equivalent registry value is not set, the JIT compiler is enabled by default.

If the MSJAVA_ENABLE_MONITORS string exists in the environment space of a Win32 process and is set to some non-zero value, profiling is enabled in any Microsoft VM that subsequently begins executing within the process.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.