Setting the following environment variable before starting your application, you can increase them easily.
Unix
export JAVA_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=1024m"
Windows
set JAVA_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=1024m"
export JAVA_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=1024m"
set JAVA_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=1024m"
java -Xms32m -Xmx128m your_applicationit will be a temporary increase of heap size and if you want to increase it permanently set the following environment variable as needed.
export _JAVA_OPTIONS="-Xms64m -Xmx128m"-Xms64m is the startup size(64MB) and -Xmx128m is the maximum size(128MB)