JDK-8275791 : Cannot start JVM when path includes CJK characters
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9,11
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86_64
  • Submitted: 2021-10-21
  • Updated: 2022-09-15
  • Resolved: 2022-08-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11.0.16-oracleResolved
Related Reports
Duplicate :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Windows 10

A DESCRIPTION OF THE PROBLEM :
JVM cannot start as below when CJK characters are included in path.

...\わさび\jdk-11.0.13_windows-x64_bin\jdk-11.0.13\bin>java -version
java version "11.0.13" 2021-10-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Download jdk-11.0.13_windows-x64
Unzip to a directory with CJK characters
Run java -version

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
...\わさび\jdk-11.0.13_windows-x64_bin\jdk-11.0.13\bin>java -version
java version "11.0.13" 2021-10-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode)
ACTUAL -
...\わさび\jdk-11.0.13_windows-x64_bin\jdk-11.0.13\bin>java -version
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

CUSTOMER SUBMITTED WORKAROUND :
Remove CJK characters from path


Comments
[11u-na] The duplicate was backported to 11.0.8.
15-09-2022

How can an issue with resolution "Cannot Reproduce" have a label "reproducer-yes" and a fix in "11.0.16-oracle"? I guess the fix is a backport of JDK-8240197? Please fix this!
24-08-2022

Only bugs with associated changesets should be closed as "Fixed". This bug should either be closed as a duplicate of a specific bug or should be closed as "Cannot Reproduce".
19-08-2022

Tested by hand and appears fixed in jdk 11.0.16... c:\ade\jdk11\わさび>jdk-11.0.16.1.1\bin\java --version java 11.0.16.1.1 2022-08-26 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.16.1.1+1-LTS-1) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.16.1.1+1-LTS-1, mixed mode)
19-08-2022

Perhaps the differences between what Swati observed and Yasumasa observed are due to the explanation that Yasumasa pointed out in a comment in JDK-8241461: I think it is not a problem because CP437 does not have Japanese Kanji chars ("日本語" means "Japanese" in Kanji). MultiByteToWideChar() with CP_THREAD_ACP would work with code page of current thread, so it cannot work if active code page does not support Japanese in this case.
28-10-2021

I tested some JDKs, and I saw the issue happens in Oracle JDK only. Path: C:\test\わさび OpenJDK 17 (jdk.java.net): OK OpenJDK 17.0.1 (jdk.java.net): OK OpenJDK 18-ea+20 (jdk.java.net): OK Temurin 11.0.13: OK Oracle JDK 11.0.13: NG [~sswsharm] What path did you evaluate?
25-10-2021

[~dholmes] Ok, I will take a look later. But I don't have any Windows 10 machine, so I will test upstream JDK on Windows 11 x64. "わさび" is Japanese chars :)
25-10-2021

This seems to be the same kind of problem as was addressed by JDK-8240197. [~ysuenaga] can you comment? Thanks.
24-10-2021

Issue is reproduced. JVM cannot start when CJK characters are included in path. This is not observed in JDK 8 Windows 10 JDK 8u311 :Pass JDK 9ea140:Fail JDK 11.0.3: Fail JDK 17: Fail Output Pass: java version "1.8.0_311" Java(TM) SE Runtime Environment (build 1.8.0_311-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode) Output Fail: Error: could not find java.dll Error: Could not find Java SE Runtime Environment.
22-10-2021