Changing the default file system provider is broken :(
Alan Bateman
Alan.Bateman at oracle.com
Sun Apr 23 10:38:21 UTC 2017
On 22/04/2017 21:48, Peter Levart wrote:
>
> Well, it works at least when
> -Djava.nio.file.spi.DefaultFileSystemProvider=... is specified on the
> command line. But when the system property is set as 1st thing in
> main() method, it is already too late. It seems that after boot
> sequence is finished (VM.isBooted() == true)and before main() method
> is called, some code needs the FileSystem again, so default file
> system is already initialized before the main() is executed.
>
> Perhaps there needs to be another initLevel which would be set just
> before the invocation of the main() method?
I don't think we go there as there are just too many scenarios where
"user code" can execute before the application main method. Instead, I
think this is a case where the default file system provider can only be
overridden by setting the property on the command line.
-Alan
More information about the jigsaw-dev
mailing list