Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » ant jdt batch compiler problem - no uniform encoding(jdt compile no uniform encoding sources)
ant jdt batch compiler problem - no uniform encoding [message #1776650] Mon, 20 November 2017 02:02 Go to next message
feng lin is currently offline feng linFriend
Messages: 1
Registered: November 2017
Junior Member
I have use the ant invoke the jdt batch compiler in my project. But there are some nouniform encoding files with it. so i need to add the specified encoding in each file. There are some problems in it.It shows below:

the ant file:

<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdatper" />
<property name="compiler.args" value="-encoding UTF-8 src/[GBK]" />

<javac destdir="${bin.dir}" includeantruntime="true" debug="true" fork="true" failonerror="true">
   <compilearg line="${compiler.args}" />
   <src path="${src.dir}"/>
   <classpath refid="compile.classpath" />

executing this task, it show errors:

public class Zz {
The type Zz is already defined.

How can i use the encoding flag to compile nouniform files.

The home document is

Re: ant jdt batch compiler problem - no uniform encoding [message #1777285 is a reply to message #1776650] Tue, 28 November 2017 07:22 Go to previous message
Jay Arthanareeswaran is currently offline Jay ArthanareeswaranFriend
Messages: 18
Registered: July 2009
Junior Member
Did you try the "encoding" attribute of Javac task, like the below example:

<javac destdir="${bin.dir}" includeantruntime="true"  encoding="UTF-8">

Also, there's a typo in the compiler adapter name "JDTCompilerAdatper".
Previous Topic:java.lang.ClassNotFoundException with java9 and maven
Next Topic:What's the difference between getResource and getUnderlyingResource in IJavaElement
Goto Forum:

Current Time: Wed Sep 19 11:17:12 GMT 2018

Powered by FUDForum. Page generated in 0.01589 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top