转换方法:ant
build.xml
<project name="encoding" default="build"> <target name="build"> <copy todir="./output" outputencoding="utf-8"> <fileset dir="."> <include name="**/*.java"/> </fileset> </copy> </target> </project>
使用方法:
- 把需要转码的目录复制到一个tmp目录
- 把build.xml文件复制到tmp目录下
- 运行ant
- 转码后文件就在output目录下,复制即可