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

Cannot start JVM when $JAVA_HOME includes CJK characters

XMLWordPrintable

    • b14
    • windows

        JVM cannot start as below when CJK characters are included in $JAVA_HOME.

        ```
        PS > .\build\windows-x86_64-server-fastdebug\images\jdk日本語\bin\java.exe --version
        Error occurred during initialization of VM
        Failed setting boot class path.
        ```

        I think this bug has been occurred since JDK-8191521.
        It uses mbstowcs_s() to convert char* to wchar_t*. But Windows API for wchar_t* (they are named *W()) requires Unicode chars for their arguments. mbstowcs_s() would not convert to Unicode. We need to use MultiByteToWideChar().

        This issue has been also confirmed in AdoptOpenJDK 11.0.6 [1]. So we also need to change jdk11u.

        [1] https://github.com/AdoptOpenJDK/openjdk-build/issues/1496

              ysuenaga Yasumasa Suenaga
              ysuenaga Yasumasa Suenaga
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: