I want to use the jdt compiler in ant to compile my project, but the project with no uniform files, so i try use the home doc encoding flag: batch compiler usage.
code below:
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
<property name="compiler.args" value="-encoding UTF-8 src/test/Test.java[GBK]" />
<javac destdir="${bin.dir}" includeantruntime="true" debug="true" failonerror="true" >
<compilerarg line="${compiler.args}" />
<src path="${src.dir}" />
<classpath refid="compile.classpath"/>
</javac>
when i run this tasks, it will show error:
Error in D:\src\test\Test.java
public class Test {
The type Test is already defined.
How can i set the different encoding in each file? Is the path wrong?