Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283280

Improve exception messages with -Dsun.misc.URLClassPath.disableJarChecking=false

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • None
    • core-libs

      When -Dsun.misc.URLClassPath.disableJarChecking=false is set, URLClassPath checks if jars on the classpath start with a valid local directory header, and reports the following exception if they do not:

      new IOException("Invalid Jar file");

      It would be nice to include the path to the jar file in the exception message, to make the issue easier to debug.

      https://github.com/openjdk/jdk/blob/3e393047e12147a81e2899784b943923fc34da8e/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java#L810

            cushon Liam Miller-Cushon
            cushon Liam Miller-Cushon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: