ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Payette, Don J" <>
Subject RE: Build with Java 1.4.2
Date Tue, 05 Apr 2005 15:46:34 GMT
Well, I got out of Eclipse and used build.bat to run ant on the
file, and it worked fine.  This verifies that it is Eclipse that is


Don Payette

PROPRIETARY MATERIAL and is thus for use only by the intended recipient.
If you received this in error, please contact the sender and delete the
e-mail and its attachments from all computers.

-----Original Message-----
From: Antoine Levy-Lambert [] 
Sent: Tuesday, April 05, 2005 12:22 AM
To: Ant Users List
Subject: Re: Build with Java 1.4.2

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
>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
>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
>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:

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

View raw message