ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: Sending -J-mx128m to Javac Task
Date Fri, 27 Apr 2001 23:21:33 GMT
--- Dana Rice <> wrote:
> In my .profile. I have tried the entry JAVACMD=java -J-mx256m and
> several things people have suggested on this topic:
: java -Xmx256m,JAVA_CMD=java -mx12m.
> I get this:ksh: -J-mx256m:  not found. This on Solaris.

Not sure which JDK you're using, but I think jdk1.2.2 uses a different
flag construct than jdk1.3 uses (and I'm not sure if jdk1.1.8 even offers
the memory-increase flag at all) -- run 'java -help' to see what the java
you're running wants for flags for upping the memory (eg., mine has the -X
flag, which you can do a help on, using 'java -X -help', to show you what
the flag should look like). Then, in your .profile, export JAVACMD (not
JAVA_CMD)with that value -- be sure to export it and quote it. For
example, mine would be (using jdk1.3):

export JAVACMD="java -Xmx256m"

If you want to see what the java command-line from the 'ant' script looks
like, bracket the line with set -x/set +x:

set -x
$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS "$@"
set +x

You should see something like (I just set it on the command-line for this
[BINKY:dianeh]: JAVACMD="java -Xmx256m" ant noop
+ java -Xmx256m -classpath
\cygwin\usr\local\ant\jakarta-ant-1.3 noop
Buildfile: build.xml



Total time: 0 seconds
+ set +x



Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

View raw message