ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@antbuild.com>
Subject AW: AW: two diff't JDKs
Date Mon, 27 Oct 2003 19:06:30 GMT
1) ant cannot guess where the java 1.1 compiler is. If you want to compile
with java 1.1, you have to give
ant the full path of the compiler in the executable attribute of the javac
task
<javac executable="c:/jdk1.1/bin/javac.exe" ... />
You might additionally need to set the "compiler" attribute, which tells ant
how to pass arguments to the compiler.

2) to avoid out of memory errors, set ANT_OPTS in your environment
export ANT_OPTS="-Xmx128M -Xms64M" for instance
(this only applies if you are starting ant from the command line; if you are
starting ant from within an IDE I do not know)

Cheers,
Antoine

-----Ursprungliche Nachricht-----
Von: Erik Price [mailto:profkyne@yahoo.com]
Gesendet: Montag, 27. Oktober 2003 19:57
An: Ant Users List
Betreff: Re: AW: two diff't JDKs


Antoine,

Thanks for responding.  The approach you describe is the one that I've
taken -- two different <javac> tasks, each of which is passed a
different <fileset> using a pattern criterion.

In fact, just to make it simple, I'm only attempting to compile the
1.3-compliant code (I've commented out the <javac> task for the
1.1-compliant code.)  However, I don't really understand how Ant
figures out where the 1.1 JDK is located -- my JAVA_HOME points to the
1.3 SDK.

On top of all that, I seem to get an OutOfMemoryError even when I limit
it to only the classes that should be compiled with 1.3:

compile:
    [javac] Compiling 1766 source files to
C:\newdist\mswp-2a\build\classes


    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.

    [javac] java.lang.OutOfMemoryError
    [javac]     <<no stack trace available>>

Is there any way to circumvent this, or extend the memory of the JVM
that Ant uses?  I have 1 GB on this box.

Thanks,

Erik




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


Mime
View raw message