ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: Build with Java 1.4.2
Date Tue, 05 Apr 2005 05:22:20 GMT
Note that you are using target=1.2 in your build.xml for the javac task. 
Not sure if it plays a role in your problem.
I do not know what are exactly class file major versions 47 and 48.
I found only this doc about this type of issue :

Payette, Don J wrote:

>I'm using eclipse for my IDE and my project has a build.xml.  Whenever I
>do a
>build, I right-click the build.xml and select Run Ant...  I then select
>All target.  Works great.
>Recently, my cohorts have suggested I need to switch from the 1.3.1 Java
>to the 1.4.2
>Java to be compatible with a new run environment.  I start eclipse with
>	C:\eclipse\V2_1_3\eclipse\eclipse.exe eclipse -vm
>So it uses the newer java vm.   However I'm getting this when I do my
>        [echo] The classpath for compilation is
>        [echo] Java home is C:\Java\j2sdk1.4.2_07
>       [javac] Compiling 307 source files to C:\SPEC\classes
>       [javac] C:\SPEC\src\com\sun\jini\debug\ cannot
>access java.lang.Object
>       [javac] bad class file:
>       [javac] class file has wrong version 48.0, should be 47.0
>       [javac] Please remove or make sure it appears in the correct
>subdirectory of the classpath.
>       [javac]     private String		propertyName;
>       [javac]             ^
>       [javac] 1 error
>       [javac] BUILD FAILED: file:C:/SPEC/build.xml:110: Compile failed;
>see the compiler error output for details.
>Total time: 3 seconds
>Any ideas what is going wrong and how to fix it?
>Here is my build.xml:
>    <target name="compile">
>    <echo message="The classpath for compilation is
>${compile.classpath}" />
>    <echo message="Java home is ${JAVA_HOME}" />
>    <javac srcdir="src"
>           deprecation="on"
>	   debug="on"
>	   destdir="classes"
>	   includes="**/*.java"
>	   excludes="**/charts*/*"
>	   target="1.2"
>	   classpath="${compile.classpath}"/>
>    </target>

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

View raw message