JDK-8242608 : java.exe does not start with special characters in parent directory names
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 13,14,15
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2020-04-11
  • Updated: 2020-11-18
  • Resolved: 2020-06-17
Related Reports
Duplicate :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Windows 10 x64
OpenJDK 13, OpenJDK 14


A DESCRIPTION OF THE PROBLEM :
We have a client app bundled with OpenJDK (and used with thousand of users). It installs itself inside the C:\User\username\AppData\Local directory.
Unfortunately some users have special characters (like UTF-8 0xC5 0x91 "��������" and 0xC5 0xB1 "��������")  in their username which is in the username folder too.

java.exe is unable to start any app, even "java -version" does not work in this environment.

REGRESSION : Last worked in version 12

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set "Language for non-Unicode programs" in Windows to "Hungarian".
Create a directory whose name contains an UTF-8 0xC5 0x91 ("��������") character.
Put some OpenJDK installations into this directory and run the commands below:

    C:\Jen��������2>jdk-10.0.2\bin\java -version
    openjdk version "10.0.2" 2018-07-17
    OpenJDK Runtime Environment 18.3 (build 10.0.2+13)
    OpenJDK 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

    C:\Jen��������2>jdk-12.0.2\bin\java -version
    openjdk version "12.0.2" 2019-07-16
    OpenJDK Runtime Environment (build 12.0.2+10)
    OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

    C:\Jen��������2>jdk-13.0.2\bin\java -version
    Error occurred during initialization of VM
    Failed setting boot class path.

    C:\Jen��������2>jdk-14\bin\java -version
    Error occurred during initialization of VM
    Failed setting boot class path.

As you can see it was working with JDK12 and before but fails with JDK13 and JDK14.


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JDK 13 and JDK 14 should show their version number too.
ACTUAL -
JDK 13 and JDK 14 fail to start and produces the error message above.

CUSTOMER SUBMITTED WORKAROUND :
Renaming the folder to a name without special character fixes the issue:

    C:\Jeno2>jdk-14\bin\java -version
    openjdk version "14" 2020-03-17
    OpenJDK Runtime Environment (build 14+36-1461)
    OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

Anyway, asking dozens of users to change their user folder in Windows seems impossible.


FREQUENCY : always



Comments
Possibly a duplicate to JDK-8242283
16-06-2020

The observations on Windows 10 with Traditional Chinese: Creating a folder with Hungarian characters---- c:\Jen����������2>jdk-11EAb1\bin\java -version Error: could not find java.dll Error: Could not find Java SE Runtime Environment. c:\Jen����������2>jdk-12\bin\java -version Error: could not find java.dll Error: Could not find Java SE Runtime Environment. c:\Jen����������2>jdk-13\bin\java -version Error: could not find java.dll Error: Could not find Java SE Runtime Environment. c:\Jen����������2>jdk-14\bin\java -version Error: could not find java.dll Error: Could not find Java SE Runtime Environment. Creating a folder with Traditional Chinese characters---- c:\������>jdk-11EAb1\bin\java -version java version "11" 2018-03-20 Java(TM) SE Runtime Environment 18.9 (build 11+1) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+1, mixed mode) c:\������>jdk-12b1\bin\java -version java version "12-ea" 2019-03-19 Java(TM) SE Runtime Environment 19.3 (build 12-ea+1) Java HotSpot(TM) 64-Bit Server VM 19.3 (build 12-ea+1, mixed mode) c:\������>jdk-13.0.1\bin\java -version java version "13.0.1" 2019-10-15 Java(TM) SE Runtime Environment (build 13.0.1+9) Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing) c:\������>jdk-14.0.1\bin\java -version Error occurred during initialization of VM Failed setting boot class path.
23-04-2020

Moved forward to JDK for more evaluation.
14-04-2020