You can change the amount of memory allocated for use by your JVM using the -Xms and -Xmx command line parameters.
For example, the following says run MyApp in a JVM and allocate a minimum of 5 Megabytes and a maximum of 15 Megabytes off of the heap in order to do so.