ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Walton <>
Subject Re: Specify source file language in build.xml?
Date Tue, 17 Feb 2015 21:35:37 GMT
On Tue, Feb 17, 2015 at 4:26 PM, Earl Hood <> wrote:
> 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="${}"
>>                     debug="true" extdirs="" includeantruntime="false"
>>                     destdir="${out.classes.absolute.dir}"
>>                     bootclasspathref=""
>>                     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 ...

That's what I was looking for! My dumb ass tried the following:

    $ /usr/local/bin/ant "java.encoding=ascii" release
    Buildfile: /Users/android-permission-explorer/build.xml

    Target "encoding=ascii" does not exist in the project "Permission Explorer".

> Command-line property settings have the highest precedence and will
> override any setting in the build files.
> ...
> Note, java.encoding is not a default java system property, so something
> is setting the property before the <javac> task is invoked.

Yeah, I'm beginning to think this is an Android problem.

Thanks for the help. Now that I have an idea of what I should do, I
think I should pursue it on an Android list.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message