Name: tb29552 Date: 10/28/98
The new JDK1.2RC1 virtual machine will not run some classes
compiled using the microsoft Java compiler. Rather an error
message is generated as follows:
Exception in thread "main" java.lang.ClassFormatError:
SimpleTest$1 (Illegal Variable name "1")
The simple attached program illustrates the problem. When
compiled with jvc (6.00.8167) and run with the new JDK1.2RC1
VM under windows NT4SP3 the above error is generated. Running
the same compiled file under JDK1.1.7 works OK.
Compiling the same program with the javac compiler supplied
with JDK1.2RC1 produces no error messages, and the resulting
class file runs correctly with the JDK1.2rc1 VM.
This bug does not appear to be documented in the "Compatibility"
section of the JDK1.2 documentation.
class SimpleTest
{
SimpleTest()
{
Thread t = new Thread("Anonymous Inner Thread!")
{
public void run()
{
loop();
}
};
t.setPriority(Thread.MIN_PRIORITY);
t.start();
}
void loop()
{
System.out.println("Hello World!");
}
public static void main(String[] argv)
{
new SimpleTest();
}
}
(Review ID: 41472)
======================================================================
- relates to
-
JDK-4135658 ClassFormatError: "bad constant pool index" error with code that works in 1.1.x
-
- Closed
-