If You mean the virtual memory, just start Your aplication like this:
java -Xmx128m <Classname>
where Xmx lets the jvm know that You want to modify the maximum of virtual memory to be used. 128m ( m for megabytes ) is just an example, the value needn齮 be a power of 2 here. Type further the name of Your class without '.java'.