Recently I have problems with the memory in The Balloon Project. By default, Java starts with a maximum configured memory of 64 Mb and when a layer is loaded with a great number of 512x512 image tiles that is not enought.
Here I want to put a couple of links to pages that talks about the JVM memory options and the out of memory exception: