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

[CRaC] Ignore errors parsing classpath

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-crac
    • repo-crac
    • core-libs
    • None
    • generic
    • generic

      CRaC's classpath handling code imposes stricter requirements on classpath property than the normal JDK does.

      For example, running `java -version -cp "file:/C:\System"` on Windows will successfully print the version description in normal JDK but will error in CRaC-ed JDK:
      ```
      Error occurred during initialization of VM
      java.lang.ExceptionInInitializerError
          at java.io.FileInputStream.<init>(java.base/FileInputStream.java:593)
          at java.lang.System.initPhase1(java.base/System.java:2218)
      Caused by: java.nio.file.InvalidPathException: Illegal char <:>
          at sun.nio.fs.WindowsPathParser.normalize(java.base/WindowsPathParser.java:204)
          at sun.nio.fs.WindowsPathParser.parse(java.base/WindowsPathParser.java:175)
          at sun.nio.fs.WindowsPathParser.parse(java.base/WindowsPathParser.java:77)
          at sun.nio.fs.WindowsPath.parse(java.base/WindowsPath.java:92)
          at sun.nio.fs.WindowsFileSystem.getPath(java.base/WindowsFileSystem.java:231)
          at java.nio.file.Path.of(java.base/Path.java:148)
          at jdk.internal.crac.JDKFileResource.<clinit>(java.base/JDKFileResource.java:49)
          at java.io.FileInputStream.<init>(java.base/FileInputStream.java:593)
          at java.lang.System.initPhase1(java.base/System.java:2218)
      ```

            tpushkin Timofei Pushkin
            tpushkin Timofei Pushkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: