在build.xml的
<target name="compile" depends="init">
<javac encoding="utf-8" srcdir="${src.path}" destdir="${build.path}" classpathref="compile.path" includeantruntime="true" />
<javac encoding="utf-8" srcdir="${test.path}" destdir="${build.path}" classpathref="compile.path" includeantruntime="true" />
</target>
添加 encoding="utf-8" 指定编码集