ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <>
Subject Re: Getting Ant to compile to a different VM?
Date Wed, 03 Jan 2007 12:39:13 GMT
If you need to compile targeted to JDK 1.3, you will need to set your 
<javac target="1.3">...  I am not an Eclipse user so I can't help you 
there...  I'm guessing an Ant build.xml is generated that you can edit?

m1ke wrote:
> Hi. I am using Ant within Eclipse and need to compile to java 1.3. The
> problem is Eclipse is loaded up with 1.5 - and as its loaded up in this, Ant
> uses 1.5. All the settings in Eclipse are set to compile to 1.3, but I'm
> having a lot of trouble finding how to do this within the Ant settings also.
> There is a Runtime JRE option which is currently set to "run in the same JRE
> as the workspace", whenever a separate JRE is selected for 1.3 the compiler
> produces an error
> Unable to load default ProjectHelper due to java.lang.NoClassDefFoundError:
> org/xml/sax/SAXException.
> Within Windows > preferences > Ant > runtime, under global entries I have
> replaced tools.jar from 1.5 to 1.3 one, which then produces the error:
>        :6: cannot access java.util.Collection
>        [javac] bad class file:
> c:\jdk1.5.0_07\jre\lib\rt.jar(java/util/Collection.class)
>        [javac] class file has wrong version 49.0, should be 47.0
>        [javac] Please remove or make sure it appears in the correct
> subdirectory of the classpath.
>        [javac] import java.util.Collection;
>        [javac]                  ^
>        [javac] 1 error
> So it's still looking in 1.5 directory.. I'm hoping any Eclipse users can
> help or even if there is a general ant solution, as I'm not sure how to get
> to stop looking in the 1.5 directory and look in the 1.3.. thanks a lot

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate
Chief Architect JavaPIM

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

View raw message