From the documentation for the STBC (which uses the JavaCompiler
).
The docs for getSystemJavaCompiler()
mention that it returns "the compiler provided with this platform or null
if no compiler is provided", but do not make clear why it might be null
, nor the fact that the compiler will not be available to applets or webstart apps. ..
It will be null
if the code is run in a non SDK JRE (see explanation in the System Requirements).