After 8300596 (see https://github.com/openjdk/jdk/commit/ecd0bc1d6205d1d1eca67cbfb9d4deaeb65739aa) we run into a regression with WhiteSource/Mend jar from
https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
jdk-17.0.8\bin\java -jar wss-unified-agent.jar
Error: An unexpected error occurred while trying to open file wss-unified-agent.jar
jdk-17.0.8\bin\java -Xdiag -jar wss-unified-agent.jar
Error: An unexpected error occurred while trying to open file wss-unified-agent.jar
java.io.IOException: Unsupported size: 8576920 for JarEntry META-INF/MANIFEST.MF. Allowed max size: 8000000 bytes
at java.base/java.util.jar.JarFile.getBytes(JarFile.java:804)
at java.base/java.util.jar.JarFile.getManifestFromReference(JarFile.java:419)
at java.base/java.util.jar.JarFile.getManifest(JarFile.java:406)
at java.base/sun.launcher.LauncherHelper.getMainClassFromJar(LauncherHelper.java:553)
at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:778)
at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:686)
Looks like the 8000000 default is too low, could we increase it e.g. to 12 or 16 million ?
Additionally the exception shown with -Xdiag should maybe contain the jdk.jar.maxSignatureFileSize property that can be used to set an own value.