ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Payette, Don J" <Don.Paye...@unisys.com>
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
build.xml
file, and it worked fine.  This verifies that it is Eclipse that is
doing
something.   

Thanks. 


Don Payette

>THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
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 [mailto:antoine@gmx.de] 
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 : 
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.htm
l#80961
Cheers,
Antoine

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
>the
>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
>C:\Java\j2sdk1.4.2_07\bin\javaw.exe
>So it uses the newer java vm.   However I'm getting this when I do my
>build:
>
>        [echo] The classpath for compilation is
>c:\Java\j2sdkee1.4.2_07\lib\j2ee.jar:jars/xerces.jar:jars/MCP.jar
>        [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\Debug.java:177: cannot
>access java.lang.Object
>       [javac] bad class file:
>C:\Java\j2sdk1.4.2_07\jre\lib\rt.jar(java/lang/Object.class)
>       [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:
>
>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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message