adoptium / adoptium-support

For end-user problems reported with our binary distributions
Apache License 2.0
43 stars 15 forks source link

JRE does not start on Windows if it is located in a directory named with Cyrillic characters #1066

Open GabrielNSD opened 1 month ago

GabrielNSD commented 1 month ago

Please provide a brief summary of the bug

I have been trying to use a JRE on a machine running windows under a user with Cyrillic characters in its name. When I try to run the JRE executable it returns the error:

Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

Did you test with the latest update version?

Please provide steps to reproduce where possible

  1. Download any JRE binary for windows x64 (.zip)
  2. Extract it in a directory written with Cyrillic characters ('габ')
  3. In terminal, go to JRE's bin directory
  4. run & .\java.exe --version

Expected Results

Terminal should output openjdk's info

Actual Results

The following errors are displayed

Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

What Java Version are you using?

openjdk 21.0.3 2024-04-16 LTS OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)

What is your operating system and platform?

Windows 11 23H2

How did you install Java?

Using binaries to execute Java, from version 8 to 22.

Did it work before?

It works flawlessly if the path does not contain Cyrillic characters.

Did you test with other Java versions?

I have tested with all versions since 8 (1.8)

Relevant log output

No response

karianna commented 1 month ago

Looks like https://bugs.openjdk.org/browse/JDK-8242283 - can you check if your code page == the system locale setting?

jerboaa commented 1 month ago

https://bugs.openjdk.org/browse/JDK-8241461 seems related too.

GabrielNSD commented 1 month ago

Looks like https://bugs.openjdk.org/browse/JDK-8242283 - can you check if your code page == the system locale setting?

I have the following setting:

System Locale: English (United States)
Current Format: English (United States)
Region: Brazil
Active Code Page: 1252 ( ANSI Latin 1; Western European (Windows) )
karianna commented 1 month ago

@GabrielNSD -

I think it's because your locale/code page doesn't support Cyrillic characters:


ANSI Latin 1, more formally known as ISO/IEC 8859-1, does not support Cyrillic characters. This encoding standard is designed to represent the Latin alphabet as used in Western European languages and includes characters for languages such as English, French, German, Spanish, and some others. It covers 191 characters, including letters with diacritics (accents), but it does not include characters from the Cyrillic script, which is used by Russian, Bulgarian, Serbian, and several other languages in Eastern Europe and Asia.

For Cyrillic characters, you would typically use ISO/IEC 8859-5 or other encodings such as Windows-1251 or KOI8-R, which are specifically designed to support Cyrillic scripts.