Home  >  Article  >  Java  >  How to deal with garbled Chinese characters in java awt

How to deal with garbled Chinese characters in java awt

coldplay.xixi
coldplay.xixiOriginal
2020-09-02 11:37:182910browse

Solution to java awt Chinese garbled code: First, right-click on the project and select Run Configuration; then select the Arguments tab and enter [-Dfile.encoding=GB18030] in the VM arguments box.

How to deal with garbled Chinese characters in java awt

java awt Chinese garbled solution:

is a problem with the running settings of eclipse, you can make the following settings :

1. Right-click the project and select Run Configuration:

How to deal with garbled Chinese characters in java awt

2. Select the Arguments tab and enter: -Dfile in the VM arguments: box below. After encoding=GB18030

How to deal with garbled Chinese characters in java awt

#, Chinese can be displayed normally. It is recommended to use swing to write java graphical interface as much as possible.

Related learning recommendations: java basic tutorial

The above is the detailed content of How to deal with garbled Chinese characters in java awt. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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