The -release option is not compatible with JavaFileManagers

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Oct 14 15:55:28 UTC 2015


On 10/13/2015 03:50 PM, Keimpe Bronkhorst wrote:
> I have a custom JavaFileManager used for JSR199 compilations, but when 
> I use the -release option I see:
>
> Error: -release option specified, but the provided JavaFileManager is 
> not a StandardJavaFileManager..
>
> This basically forces everybody to implement StandardJavaFileManagers, 
> even if they don't want that. Isn't there a way to make this work with 
> JavaFileManagers?
>
> Keimpe Bronkhorst
> JDeveloper
>

cc: compiler-dev at openjdk.java.net
bcc: jigsaw-dev at openjdk.java.net

Keimpe,

This is not a Jigsaw issue. This would be better addressed on 
compiler-dev at openjdk.java.net.

-release works in a fairly general way by checking that -source, 
-target, -bootclasspath+friends, are not set, and then providing values 
for them. This implies that -release will internally call 
fileManager.setLocationFromPaths(PLATFORM_CLASS_PATH, <<path>>) which 
requires that the file manager should be a StandardJavaFileManager.

We can investigate whether it might be possible to generalize this.

-- Jon


More information about the jigsaw-dev mailing list