You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Eddie Bernard <eb...@digitalthink.com> on 2001/10/22 07:48:50 UTC
Ant 1.4 -- javac task
Has anyone experienced this problem? I need to extend the memory size
parameter for the javac task. The command line syntax for this would
normally look like:
javac -J-Xms64m -J-Xmx512m Foo.java
The only way you can make these changes is within Ant 1.4 and higher. So,
in looking at the docs I made the following modifications to my target task:
<javac srcdir="${lms.src};${lms.beans}"
destdir="${lms.build}"
excludesfile="${lms.excludesfile}"
optimize="off"
deprecation="off"
depend="false"
failonerror="no"
classpath="${lms.classpath}"
memoryInitialSize="64m"
memoryMaximumSize="512m">
</javac>
However, now I'm getting the following error:
classes:
[echo] --(DT)--> Compiling class files
[javac] Compiling 618 source files to /vobs/lms/build
[javac] -J-Xmx512m is an invalid option or argument.
[javac] Usage: javac <options> <source files>
[javac]
[javac] where <options> includes:
[javac] -g Generate all debugging info
[javac] -g:none Generate no debugging info
[javac] -g:{lines,vars,source} Generate only some debugging info
[javac] -O Optimize; may hinder debugging or
enlarge class files
[javac] -nowarn Generate no warnings
[javac] -verbose Output messages about what the compiler
is doing
[javac] -deprecation Output source locations where
deprecated APIs are used
[javac] -classpath <path> Specify where to find user class files
[javac] -sourcepath <path> Specify where to find input source
files
[javac] -bootclasspath <path> Override location of bootstrap class
files
[javac] -extdirs <dirs> Override location of installed
extensions
[javac] -d <directory> Specify where to place generated class
files
[javac] -encoding <encoding> Specify character encoding used by
source files
[javac] -target <release> Generate class files for specific VM
version
[javac] Compile failed, messages should have been provided.
Anybody have any ideas on how to get around this?
Re: Ant 1.4 -- javac task
Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 22 Oct 2001, Conor MacNeill <co...@cortexebusiness.com.au>
wrote:
> These attributes are only effective when you use the fork="yes"
> attribute, since that is the only way to control the memory of the
> javac process.
Not true for Ant 1.4, this has been fixed for Ant 1.4.1.
Eddie, you'll need to upgrade to the latest Ant release.
Stefan
RE: Ant 1.4 -- javac task
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Eddie,
That is a bit odd. These attributes are only effective when you use the
fork="yes" attribute, since that is the only way to control the memory of
the javac process. You should have received a warning about that.
Can you try adding the fork attribute in and also running an ant -debug to
see why this may be happening?
Conor
> -----Original Message-----
> From: Eddie Bernard [mailto:ebernard@digitalthink.com]
> Sent: Monday, 22 October 2001 3:49 PM
> To: 'ant-user@jakarta.apache.org'
> Subject: Ant 1.4 -- javac task
>
>
> Has anyone experienced this problem? I need to extend the memory size
> parameter for the javac task. The command line syntax for this would
> normally look like:
>
> javac -J-Xms64m -J-Xmx512m Foo.java
>
> The only way you can make these changes is within Ant 1.4 and higher. So,
> in looking at the docs I made the following modifications to my
> target task:
>
> <javac srcdir="${lms.src};${lms.beans}"
> destdir="${lms.build}"
> excludesfile="${lms.excludesfile}"
> optimize="off"
> deprecation="off"
> depend="false"
> failonerror="no"
> classpath="${lms.classpath}"
> memoryInitialSize="64m"
> memoryMaximumSize="512m">
> </javac>
>
> However, now I'm getting the following error:
>
> classes:
> [echo] --(DT)--> Compiling class files
> [javac] Compiling 618 source files to /vobs/lms/build
> [javac] -J-Xmx512m is an invalid option or argument.
> [javac] Usage: javac <options> <source files>
> [javac]
> [javac] where <options> includes:
> [javac] -g Generate all debugging info
> [javac] -g:none Generate no debugging info
> [javac] -g:{lines,vars,source} Generate only some debugging info
> [javac] -O Optimize; may hinder debugging or
> enlarge class files
> [javac] -nowarn Generate no warnings
> [javac] -verbose Output messages about what
> the compiler
> is doing
> [javac] -deprecation Output source locations where
> deprecated APIs are used
> [javac] -classpath <path> Specify where to find user
> class files
> [javac] -sourcepath <path> Specify where to find input source
> files
> [javac] -bootclasspath <path> Override location of bootstrap class
> files
> [javac] -extdirs <dirs> Override location of installed
> extensions
> [javac] -d <directory> Specify where to place
> generated class
> files
> [javac] -encoding <encoding> Specify character encoding used by
> source files
> [javac] -target <release> Generate class files for specific VM
> version
> [javac] Compile failed, messages should have been provided.
>
> Anybody have any ideas on how to get around this?
>
>