ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lefevre" <eric.lefe...@valtech.co.uk>
Subject forking javac with specified memory settings
Date Wed, 22 Aug 2001 16:59:20 GMT
Hello all,

This is a follow-up on the bug/improvement that I have submitted earlier
today (bug 3225).
As the current situation is preventing us from using the fork/extJavac
option and therefore from using CruiseControl, I have hacked the code
locally to make Ant 1.4beta2 work for us.

My proposal is to add the following attributes to the <javac> task:
memoryInitialSize and memoryMaximumSize.
A call to <javac> would look like this:
 <javac extdirs="resources\lib\shared"
        fork="yes"
        memoryInitialSize="128m"
        memoryMaximumSize="256m"
        classpath=" "
        srcdir="${basedir}/sources/java"
        destdir="${basedir}/classes"
        includes="${shared.root}/*.java" />

The system call to javac would then include the parameters "-J-Xms128m"
and "-J-Xmx256m". This seems to work well on my machine (Win2K with JDK
1.3 & JDK 1.3.1).

ant.taskdefs.Javac and ant.taskdefs.compilers.DefaultCompilerAdapter are
the classes where changes occur.

Do you think my solution is proper? is there any risk this would break
on other systems/JDKs?

Keeping in mind that fork is only supposed to work for the JDK's javac
and only on version 1.1 or higher, I do not expect problems.

Eric


Mime
View raw message