error from ant script

Jerry James loganjerry at gmail.com
Tue Mar 24 19:43:33 UTC 2009


On Tue, Mar 24, 2009 at 12:48 PM, Subhodip Biswas <440volt.tux at gmail.com> wrote:
> I am still facing the problem even though i shifted to openjdk from
> gcj.How to specify target and source for ant in a specfile.
> I tried this but was of no help.
> ------------------------------------------------
> ant -Dant.build.javac.source=1.5  -Dant.build.javac.target=1.5
>
> My present java compiler is :
> ------------------------------------------------
> java version "1.6.0"
> OpenJDK  Runtime Environment (build 1.6.0-b09)
> OpenJDK Client VM (build 1.6.0-b09, mixed mode)
>
> Present error I am getting is this :
> -------------------------------------------------------------
>  warning: as of release 5, 'enum' is a keyword, and may not be used as
> an identifier
>    [javac] (use -source 5 or higher to use 'enum' as a keyword)
>

That's a different problem than the one your first described.  Your
first error message said that "static import" was in use, which is a
Java >= 5 feature.  This error message says that the code uses "enum"
as a keyword, which is a Java < 5 feature.  So parts of this code seem
to require a Java 5 or greater compiler, and other parts require a
pre-Java 5 compiler.  You'd better ask upstream if you are really
supposed to compile all of the parts with the same compiler.  Perhaps
some parts can be omitted when one compiler or the other is in use.
For example, I have a couple of packages that use retroweaver to
support pre-Java 5 compilers.  I skip the retroweaver parts when
compiling for Fedora.
-- 
Jerry James
http://loganjerry.googlepages.com/




More information about the fedora-devel-list mailing list