maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mandy Chung <>
Subject Re: JavaxToolsCompiler
Date Mon, 14 Sep 2015 20:43:23 GMT
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message