By default, the JVM (on Windows) doesn't allocate more than 64 MB memory. If you need more, start your program with the -Xmx command line switch. For example:
java -Xmx256m com.mypackage.MyProgram
This will allow the JVM to allocate up to 256 MB memory.