Replacing default FileSystemProvider
Michael Hall
mik3hall at gmail.com
Sun Mar 21 21:46:18 UTC 2021
> On Mar 21, 2021, at 10:20 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> On 21/03/2021 10:04, Michael Hall wrote:
>> (base) Michaels-MacBook-Pro:halfpipe_jpkg mjh$ /usr/libexec/java_home -v 9 --exec java -cp .:outputdir/HalfPipe.app/Contents/app/macnio2.jar -Djava.library.path=outputdir/HalfPipe.app/Conents/app -Djava.nio.file.spi.DefaultFileSystemProvider=us.hall.trz.osx.MacFileSystemProvider Test
>> Exception in thread "main" java.lang.Error: java.lang.NullPointerException
>> at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:141)
>> at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.access$100(FileSystems.java:102)
>> at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:111)
>> at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:109)
>> at java.base/java.security.AccessController.doPrivileged(Native Method)
>> at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:109)
>> at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.<clinit>(FileSystems.java:103)
>> at java.base/java.nio.file.FileSystems.getDefault(FileSystems.java:190)
>> at Test.main(Test.java:6)
>> Caused by: java.lang.NullPointerException
>> at java.base/java.io.File.toPath(File.java:2300)
>>
> Thanks, I understand this now and I can duplicate it. The issue is re-implementation and other work on ZipFile means leads to a bootstrapping issue when the default provider is override and deployed in JAR file. Thanks for persisting with the mails on this, I'll create a bug to track this.
>
> -Alan
Could you forward the bug report number when you have one? I would like to re-do some of the GitHub related to this and com.apple.eio.FileManager when I know this will work current. So track the bug a little myself.
Thanks again.
More information about the nio-dev
mailing list