JavaxToolsCompiler

Robert Scholte rfscholte at apache.org
Mon Sep 14 21:10:45 UTC 2015


Op Mon, 14 Sep 2015 20:27:39 +0200 schreef Alan Bateman  
<Alan.Bateman at oracle.com>:

> On 14/09/2015 17:40, Robert Scholte wrote:
>> Hi,
>>
>> On behalf of the Apache Maven team I'd like to ask for advice for  
>> changing the JavaxToolsCompiler[1]
>> This implementation is used when java code is being compiled with Maven  
>> *by default*, so right now when pointing JAVA_HOME to the latest JDK9  
>> version builds will fail.
>> There are other ways to compile, e.g. use the fork-parameter[2] or with  
>> toolchains[3], but what I'd like to know is whether it is still  
>> possible/valid to use javax.tools.JavaCompiler and is so: how should we  
>> rewrite this code?
>
> Thanks for bringing this up as a few people have reported issues with  
> Maven not finding the compiler.
>
> Just to be clear, are you seeing this issue with the regular JDK 9 EA  
> builds or just the Jigsaw EA builds?

Regular JDK9 EA works fine, I'm only seeing it with Jigsaw EA

> Did this start when tools.jar went away?

I guess so.

> I just did a quick test to check that  
> ToolProvider.getSystemJavaCompiler() is returning the system  
> JavaCompiler is returned for both builds (and it is). Is the issue that  
> you are seeing that getSystemJavaCompiler() is returning null?

Stuart said yes, I think so too.

>
> -Alan.

Robert


More information about the jigsaw-dev mailing list