Saturday, November 12, 2005

Setting java heap size, for java and ant

If you are using the java command prompt, you can very well set the heap size with the -Xms switch.
example:
java -Xms64m -Xmx512m
where
-Xms specifies the initial Java heap size and
-Xmx the maximum Java heap size.

If you are using Ant to run your java classes, set the heap size using the following command line:
set ANT_OPTS=-Xmx300M

0 Comments:

Post a Comment

<< Home