.is there any way by which I can increase the memory allotted by JVM for the application at runtime ?
Yep. Use the -XmxNNm switch, where NN is a number of megabytes to use for the
Java heap. The default is commonly 64. So
java -Xmx128m MyClass
would run MyClass with twice the normal heap size.