Problems running gradle with jdk 17.0.8+7

In jdk 17.0.8+7 they have added more check in the ZipFIle class. This results now in a ZipException for certain jar files. To prevent this the jdk provides the system property “jdk.util.zip.disableZip64ExtraFieldValidation=true”. Unfortunately i was not able so far to pass this property to the gradle daemon executing my build and therefore it always fails. I verified with the debugger that the bild would work fine if this property is really set in the jvm.

I tried to set this propety in my gradle.properties file as
org.gradle.jvmargs=-Djdk.util.zip.disableZip64ExtraFieldValidation=true
but this does not work, the property is not passed to the executing jvm.

Is there a special way to pass this property to the executing jvm so my build is able to work properly?

Are you sure it is the daemon the fails, not one of the other workers like test execution worker, compile worker, …?

I know that it is not the test execution worker, this one i could fix. The problem happens whenever a jar is opened with the ZipFIle class. In the meantime i found out in which step some of the jar files get corrupted. Fortunately they are not already corrupted in maven central repository. Its a thirdparty gradle plugin we use and which has not been maintained the last years. I hope i can fork and fix it by myself.

1 Like