jrt file system now has /package and /modules directories
Alan Bateman
Alan.Bateman at oracle.com
Sun Jul 26 07:08:57 UTC 2015
On 26/07/2015 01:29, Michael Hall wrote:
>> On Jul 25, 2015, at 12:10 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>>
>>
>> Just a heads-up that jdk9-b74 has a refresh of the jimage and jrt file system implementation.
> Have mostly just been following along on this a little with the early access releases. I was a little curious on this though so I cloned and built current jdk9.
> I have a simple jrt filesystem lister that I tried running getting…
>
> ~/jdk9/build/macosx-x86_64-normal-server-release/jdk/bin/java -cp . JRTLister
> java.nio.file.FileSystemNotFoundException: /Users/mjh/jdk9/build/macosx-x86_64-normal-server-release/jdk/lib/modules/bootmodules.jimage
> at jdk.internal.jrtfs.JrtFileSystem.checkExists(JrtFileSystem.java:87)
> at jdk.internal.jrtfs.JrtFileSystem.<init>(JrtFileSystem.java:102)
> at jdk.internal.jrtfs.JrtFileSystemProvider$1.<init>(JrtFileSystemProvider.java:113)
> at jdk.internal.jrtfs.JrtFileSystemProvider.getTheFileSystem(JrtFileSystemProvider.java:113)
> at jdk.internal.jrtfs.JrtFileSystemProvider.getFileSystem(JrtFileSystemProvider.java:131)
> at java.nio.file.FileSystems.getFileSystem(FileSystems.java:221)
> at JRTLister.main(JRTLister.java:13)
>
> Obviously finding JrtFileSystem but not modules/bootmodules.jimage?
>
Replace jdk/bin/java with images/jdk/bin/java in your path above and I
expect it should work.
The jdk directory in the build output is the "exploded build". It's an
intermediate step in the build before the JDK and JRE images are
created. Many people working on the JDK use the exploded builds for
quick edit-build-debug sessions and local testing but I don't think is
used much beyond that.
JDK-8066860 [1] is tracking an update to the jrt file system to support
exploded builds. Sundar has an initial patch but it's not in JDK 9 yet.
-Alan
[1] https://bugs.openjdk.java.net/browse/JDK-8066860
More information about the jigsaw-dev
mailing list