java jvm 11 don't start

Viewed 834

os: windows 10 java : 11.0.1

i setting Environmental variable

set JAVA_HOME=<null>

set CLASSPATH=<null>

set PATH='d:\java\jdk-11.0.1\bin

cmd runing

java -version

cmd runing

java -version

return this error:

Error occurred during initialization of VM
java.lang.IllegalArgumentException: Null charset name
    at java.nio.charset.Charset.lookup(java.base/Charset.java:455)
    at java.nio.charset.Charset.defaultCharset(java.base/Charset.java:608)
    at java.lang.StringCoding.decode(java.base/StringCoding.java:316)
    at java.lang.String.(java.base/String.java:592)
    at java.lang.String.(java.base/String.java:614)
    at java.lang.System.initProperties(java.base/Native Method)
    at java.lang.System.initPhase1(java.base/System.java:1942)

i try

java -Dfile.encoding=UTF-8

same error

my jdk8 is ok

my jdk 11 is ok at company computer

what?

2 Answers

This problem can reproduce in simplified chinese Windows with gb18030 support package installed. I trace it with process monitor, saw the process end with some buffer overflow error, while loading font file named simsun gb18030(something like this, I don't remember clearly.) this problem exist at any version of hotspot jvm after JDK 11. but for j9 vm, there's no problem.

If you use ideaC-2020.3.win, try jbr.

Related