JavaxToolsCompiler
Mandy Chung
mandy.chung at oracle.com
Mon Sep 14 20:43:23 UTC 2015
On 09/14/2015 12:44 PM, Alan Bateman wrote:
>
>
> On 14/09/2015 20:21, Stuart McCulloch wrote:
>> Yes, the issue is that ToolProvider.getSystemJavaCompiler() is
>> returning null when using the Jigsaw EA with Maven.
>>
>> AFAICT this is because it’s now using the service loader mechanism
>> which is influenced by the Thread’s context ClassLoader
>>
>>
> That may be a bug as I wouldn't expect the ToolProvider.getSystemXXX
> methods to locate the these tools via the TCCL.
I was talking with Jon about this. This is a bug in ToolProvider that
it should call
ServiceLoader.load(clazz, ClassLoader.getSystemClassLoader());
Looking at ToolProvider, the getSystemToolClassLoader method catches my
attention that I think we should consider deprecating it since this
assumes there is one class loader loading multiple tools.
Mandy
More information about the jigsaw-dev
mailing list