解决办法 编译 javac -encoding gbk test2.java 运行 java -Dfile.encoding=”GBK” test2 但是其实我个人的实践说明直接用 java test2 也是可以运行的。