1.
ant编译到一般突然停止不报错/编译到javac时报错--->build.xml->run as->External tools Configurations -> common -> dncofing ->other ->UTF-8
2.javac编译失败, 将<javac encoding=“”>改为和你代码相匹配的字节码
3为ANT进行输出的时候,默认的情况下使用的是系统默认的字符集编码,所以如果在英文操作系统,经常发生控制台输出乱码的情况,使用下面的配置可以解决问题:
<sysproperty key="file.encoding" value="UTF-8" />
<javac srcdir="${project.src}" destdir="${project.output.build}" debug="on" encoding="UTF-8" deprecation="on" listfiles="on" includeAntRuntime="no">
<compilerarg value="-Xlint:all" />
<classpath refid="project.classpath" />
<classpath refid="tomcat.classpath" />
</javac>
<java classpathref="project.classpath" classname="com.mose.ParserEnglish" fork="true" failonerror="true">
<sysproperty key="file.encoding" value="UTF-8" />
<arg value="-h" />
</java>