Solution to the eclipse 3.4 ant problem

Source: Internet
Author: User

Problem description: When the console outputs Chinese characters (for example, juint outputs 2 characters), it stops running the previous step of the output Chinese characters.

Solution:

First
On the common tab of ant settings, set console encoding to gb18030 (or GBK) encoding.

When the console encoding in the common tab of ant does not have gb18030 (or GBK), go to eclipse->
Windows> preference> General> workspace option text file
Encoding to gb18030 (or GBK) application, and then back to the UTF-8

Second
On the main tab of ant settings, enter-duser. language = EN in arguments.

Third
In the javac tag of the build. xml file, add
<Javac...>
...
<Compilerarg value = "-J-Duser.language = EN"/>
</Javac>

Fourth
You can explicitly use gb18030 (or GBK) encoding in the XML Declaration of the build. xml file.
<? XML version = "1.0" encoding = "gb18030"?>

Finally, if you use the command line to run ant, you do not need to change anything.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.