git: openjdk/leyden: hermetic-java-runtime: Load ZipFileSystemProvider using a ServiceLoader directly and create the 'jarFileSystem' using the ZipFileSystemProvider. This is to avoid a circular loading problem during early system initialization when accessing JAR packaged JDK resources (specifically java.security), with user provided FileSystem provider involved.

duke duke at openjdk.org
Tue Jan 23 22:29:52 UTC 2024


Changeset: 23b228ea
Author:    Jiangli Zhou <jianglizhou at google.com>
Date:      2024-01-23 14:16:23 +0000
URL:       https://git.openjdk.org/leyden/commit/23b228ea6b67b98e1fb96198b1536a51763ad374

Load ZipFileSystemProvider using a ServiceLoader directly and create the 'jarFileSystem' using the ZipFileSystemProvider. This is to avoid a circular loading problem during early system initialization when accessing JAR packaged JDK resources (specifically java.security), with user provided FileSystem provider involved.

We discussed with Alan Bateman, Ron Pressler about building the JDK resources into `modules` file. When that's done, accessing hermetic packaged JDK resources would no longer use the ZipFileSystem.

! src/java.base/share/classes/jdk/internal/misc/JavaHome.java



More information about the leyden-dev mailing list