ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Sending -J-mx128m to Javac Task
Date Fri, 27 Apr 2001 23:21:33 GMT
--- Dana Rice <Dana.Rice@exodus.net> 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
org.apache.tools.ant.Main "$@"
set +x

You should see something like (I just set it on the command-line for this
example):
[BINKY:dianeh]: JAVACMD="java -Xmx256m" ant noop
+ java -Xmx256m -classpath
.;D:\cygwin\usr\local\ant\jakarta-ant-1.3\lib\ant.jar;D:\cygwin\usr\local\ant\jakarta-ant-1.3\lib\jakarta-ant-1.3-optional.jar;D:\cygwin\usr\local\ant\jakarta-ant-1.3\lib\jaxp.jar;D:\cygwin\usr\local\ant\jakarta-ant-1.3\lib\parser.jar;D:\cygwin\usr\local\java\jdk13\lib\tools.jar
-Dant.home=D:
\cygwin\usr\local\ant\jakarta-ant-1.3 org.apache.tools.ant.Main noop
Buildfile: build.xml

noop:

BUILD SUCCESSFUL

Total time: 0 seconds
+ set +x

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Mime
View raw message