The information in this article applies to:
Running the below program causes the Microsoft VM to use 100 percent of the CPU. This process will hang the PC until it is terminated.
This is due to a bug found in builds 315x of the Microsoft VM exception handling logic.
Download and install the latest Microsoft VM from the following Web page:
http://www.microsoft.com/java/download.htm .
Microsoft has confirmed this to be a bug in Microsoft VM Version 315x.
To Reproduce Behavior
Compile and run the following code. On machines with the Microsoft VM that contain this bug, the CPU usage on the machine will go to 100 percent and the Microsoft VM will hang. However, on a machine with a fixed Microsoft VM, the string "java.lang.Exception" will be output and the program will exit immediately.
public class Test { public static void main( String [] args ) { Integer i = new Integer( 6 ); synchronized( i ) { if (true) throw new NullPointerException(); } } }
For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/
hhtp://support.microsoft.com/support/java/