On Tue, Feb 17, 2015 at 2:58 PM, Jeffrey Walton wrote:

>> Use the 'encoding' attribute to the <javac> task.
...
>             <javac encoding="${java.encoding}"
>                     source="${java.source}" target="${java.target}"
>                     debug="true" extdirs="" includeantruntime="false"
>                     destdir="${out.classes.absolute.dir}"
>                     bootclasspathref="project.target.class.path"
>                     verbose="${verbose}"
>                     classpathref="project.javac.classpath"
>                     fork="${need.javac.fork}">
>                 <src path="${source.absolute.dir}" />
>                 <src path="${gen.absolute.dir}" />
>                 <compilerarg line="${java.compilerargs}" />
>             </javac>

I do not know the specifics of how your build files are organized and if
you are using <ant> tasks to call other build files or you are including
all the build files so that targets are available directly.

With the fragment above, you need to set the java.encoding property.
You can do this from the command-line:

  ant -Djava.encoding=UTF-8 ...

Command-line property settings have the highest precedence and will
override any setting in the build files.

If you are using <ant> and/or <antcall>, both tasks allow you to
specify property settings for the target(s) you invoke (see the
documentation).

>   <project>
>   ...
>     <property name="java.encoding" value="ascii" />
>   </project>

If you know the source files are using UTF-8, then use "UTF-8" as the
encoding.

Note, java.encoding is not a default java system property, so something
is setting the property before the <javac> task is invoked.

--ewh

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to