RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v2]

Ichiroh Takiguchi itakiguchi at openjdk.java.net
Thu Nov 11 14:13:32 UTC 2021


On Tue, 9 Nov 2021 19:38:01 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Please review the subject fix. In light of JEP400, Java runtime can/should start in UTF-8 charset if the underlying native encoding is not supported.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Emit a warning on unsupported jnu encoding

I applied same kind of patch into jdk17u.
The situation was same.

$ env LC_ALL=kk_KZ.pt154 ./build/linux-x86_64-server-release/images/jdk/bin/java -showversion Hello.java 
WARNING: The encoding of the underlying platform's file system is not supported by the JVM: PT154
openjdk version "17.0.1-internal" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1-internal+0-adhoc.jdktest.jdk17u)
OpenJDK 64-Bit Server VM (build 17.0.1-internal+0-adhoc.jdktest.jdk17u, mixed mode, sharing)
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.util.ServiceConfigurationError: java.nio.charset.spi.CharsetProvider: Unable to load sun.nio.cs.ext.ExtendedCharsets
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:586)
...

-------------

PR: https://git.openjdk.java.net/jdk/pull/6282


More information about the core-libs-dev mailing list