ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <A.Solofne...@mdl.com>
Subject Re: Compiling enums in Ant 1.6.5
Date Thu, 15 Dec 2005 22:57:01 GMT
You will need to point JAVA_HOME to 1.5 JDK (not JRE). Please also use 
directories without spaces.

- Alexey.

Rhino wrote:
> Can the <javac> task in Ant 1.6.5 compile a typesafe enum when using 
> the 'modern' compiler? If yes, how do I persuade it to do so? If no, 
> is there any workaround or will I just have to compile the enum 
> separately and include it in my build manually?
>
> Here is my task:
>
> <target name="compile" description="Compile the Java code.">
> <javac srcdir="${common.src}" destdir="${common.bin}" 
> compiler="modern" fork="yes"
>  verbose="no" debug="on" debuglevel="lines,vars,source" deprecation="yes"
>  description="Compile the code in the common package.">
>  <patternset refid="ps.common"/>
>  </javac>
> </target>
>
> Here is the (relevant) output from the build, which had both the 
> -debug and -verbose switches on:
>
> [javac] 
> E:\eclipse\3.0.1\eclipse\workspace\Common\src\ca\maximal\common\Palette.java:19: 
> 'class' or 'interface' expected
>
> [javac] public enum Palette {
>
> [javac] ^
>
>
> For what it's worth, I tried adding the source="1.5" parameter to the 
> target and got the message "javac: invalid source release: 1.5". My 
> JAVA_HOME environment variable is set to D:\Program 
> Files\Java\jre1.5.0_06, otherwise I'd suspect that I was pointing at a 
> 1.4 (or earlier) compiler.
>
> Can anyone shed some light on how I can get Ant to compile this enum?
>
> Rhino
>
>
>

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


Mime
View raw message