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

-Xlog option usage => Invalid decorator '\temp\app_cds.log'.

    Details

    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      x86_64
    • OS:
      windows

      Backports

        Description

        ADDITIONAL SYSTEM INFORMATION :
        Microsoft Windows 10 Pro (version 1803, OS version 17134.471)
        OpenJDK 11.0.1 (2018-10-16), JRE 18.9 (build 11.0.1+13)


        A DESCRIPTION OF THE PROBLEM :
        Option -Xlog does not support Windows absolute paths, namely:
        1) OK : -Xlog:class+load:file=app_cds.log
        2) KO : -Xlog:class+load:file=c:\temp\app_cds.log
        3) OK: -Xlog:class+load:file=\temp\app_cds.log (<== drive C: is assumed here !)

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        C:\temp> javac HelloWorld.java
        C:\temp> jar cf app.jar -C . HelloWorld.class
        C:\temp> java -XX:DumpLoadedClassList=C:\temp\classlist.txt -classpath app.jar HelloWorld
        C:\temp> java -XX:SharedClassListFile=C:\temp\classlist.txt -XX:SharedArchiveFile=c:\temp\app_cds.jsa -Xshare:dump -classpath app.jar
        C:\temp>

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        C:\temp> java.exe -Xshare:on -Xlog:class+load:file=app_cds.log -XX:SharedArchiveFile=c:\temp\app_cds.jsa -classpath app.jar HelloWorld
        Hello world!
        ACTUAL -
        C:\temp> java -Xshare:on -Xlog:class+load:file=c:\temp\app_cds.log -XX:SharedArchiveFile=c:\temp\app_cds.jsa -classpath app.jar HelloWorld
        [0.003s][error][logging] Invalid decorator '\temp\app_cds.log'.
        Invalid -Xlog option '-Xlog:class+load:file=c:\temp\app_cds.log', see error log for details.
        Error: Could not create the Java Virtual Machine.
        Error: A fatal exception has occurred. Program will exit.

        ---------- BEGIN SOURCE ----------
        // File C:\temp\HelloWorld.java
        public class HelloWorld {
            public static void main(String... args) {
                System.out.println("Hello world!");
            }
        }
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        *** simply omit the drive letter "C:" ***
        C:\temp> java -Xshare:on -Xlog:class+load:file=\temp\app_cds.log -XX:SharedArchiveFile=c:\temp\app_cds.jsa -classpath app.jar HelloWorld
        Hello world!

        FREQUENCY : always


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hseigel Harold Seigel
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: