- <target name="compile" depends="prepare">
- <echo message="5.compile" />
- <javac fork="true" target="1.6" srcdir="${src}" destdir="${build}" debug="true">
- <!--给编译器指定编码,防止出现:"警告: 编码 GBK 的不可映射字符"-->
- <compilerarg line="-encoding UTF-8 " />
- <classpath refid="external.jars.path" />
- </javac>
- <echo message="compile finished!" />
- </target>
在Ant的javac中指定源文件编码方式,以避免"警告: 编码 GBK 的不可映射字符"的错误
最新推荐文章于 2021-05-24 12:02:18 发布