FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b100)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b100, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
ToolProvider.getSystemJavaCompiler returns null. This is a expected behavior if a compiler isn't supported by the runtime, according to the javadoc. However, installing the lastest Mustang on two identical windows 2000 systems renders different behaviors. Machine A, everything works as expected. Machine B, no compiler available.
REGRESSION. Last worked in version mustang
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Attempt to get the system java compiler
In some instances it's null
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Sun's Java runtime should always return a compiler.
ACTUAL -
Null sometimes
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Altough this is crictical error the method used returns null instead of throwing an exception!
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.tools.*;
public class Test
{
public static void main(String ... args)
{
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
System.out.println(compiler);
}
}
---------- END SOURCE ----------