How to Set up the Java Chinese environment in Linux
Source: Internet
Author: User
How to Set up the Java Chinese environment in Linux-general Linux technology-Linux programming and kernel information. For details, refer to the following section. When using Java to develop an application in Linux, the Chinese display is abnormal, and the Chinese character in the application in the window is displayed as a string of squares. This is mainly because the font settings are incorrect. In the configuration file that comes with JDK, the specified Chinese font does not exist, leading to incorrect display. This article takes Mandrake Linux 8.2 and JDK 1.4.1 as examples to briefly introduce how to set up the Java Chinese environment in Linux. For other Linux systems or JDK versions, see this article.
First, check whether your/usr/share/fonts/ttf/gb directory contains the Chinese font gbsn00lp. ttf. If not, use song. ttf in the Windows Font directory. Copy the font file to jre/lib/fonts in the Java installation directory.
Second, modify the jre/lib/fonts. dir file in the Java installation directory, change 72 in the first line to 73, and then add the following content:
Note: If you use song. ttf, change gbsn00lp. ttf in the header to song. ttf.
Third, copy the font. properties. zh. Turbo file to font. properties. zh In the jre/lib directory under the Java installation directory. Then modify font. properties. zh. Put all of the files:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service