问题描述:当console输出有中文时(比如用JUint会输出 信息 2字),会运行到输出汉字的前一步就停止。

解决方法:

第一种
在 ant 设置的 common 选项卡 中设置 Console Encoding 为GB18030(或者GBK)编码即可

当ant的common选项卡里的 Console Encoding 没有GB18030(或者GBK)时,先在 eclipse -> windows -> Preference -> General -> Workspace 选项的 text file encoding 改为GB18030(或者GBK)应用一下,再改回UTF-8

第二种
在 ant 设置的 main 选项卡 里的Arguments里输入 -Duser.language=en

第三种
在build.xml文件的javac标签里添加
    <javac ...>
        ...
        <compilerarg value="-J-Duser.language=en"/>
    </javac>

第四种
在build.xml文件的xml声明里显式使用GB18030(或者GBK)编码即可。
<?xml version="1.0" encoding="GB18030" ?>

最后,如果采用命令行来运行ant,则什么都不用改。

相关文章:

  • 2021-12-02
  • 2022-01-20
  • 2021-08-10
  • 2021-11-11
  • 2021-07-16
  • 2022-01-03
  • 2021-11-21
  • 2021-12-03
猜你喜欢
  • 2021-11-10
  • 2021-12-19
  • 2022-01-07
  • 2021-06-21
  • 2021-10-28
  • 2022-02-21
  • 2021-06-06
相关资源
相似解决方案