The jar-in-jar
loader does not support multi-release JARs
#1057
Labels
help wanted
Extra attention is needed
jar-in-jar
loader does not support multi-release JARs
#1057
To handle multi-release JARs, Java 9 extends the format of
jar:
URLs:#runtime
fragment, the JAR file is opened in multi-release mode,See, e.g.:
https://github.com/openjdk/jdk/blob/88378ed0584c7eb0849b6fc1e361fd8ea0698caf/src/java.base/share/classes/java/net/JarURLConnection.java#L178-L186
The
#runtime
fragment is propagated to the URL of the jar file to allowJarUrlConnection
to open the file in multi-release mode.The
jar-in-jar
loader strips this fragment fromrsrc:
URLs and therefore breaks multi-release JARs.Minimal reproducible example
You can find a minimal reproducible example here:
https://github.com/copernik-eu/bug-reproducibility/tree/main/eclipse-jar-in-jar
The text was updated successfully, but these errors were encountered: