Home > Java > JavaBase > Java program cannot display Chinese

Java program cannot display Chinese

王林
Release: 2019-11-20 10:23:31
Original
8478 people have browsed it

Java program cannot display Chinese

1. Running java hello cannot display Chinese (displayed as garbled characters)

Java program cannot display Chinese

2. Running java javaCode displays the java default dial The code encoding is US-ASCII

Java program cannot display Chinese

3. Enter export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8, and run java javaCode again, and the encoding is changed to UTF -8

Java program cannot display Chinese

4. Run java hello again to display Chinese normally

Recommended tutorial: java quick start

The above is the detailed content of Java program cannot display Chinese. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template