If JVM head size for Tomcat is not enough, you would get the error java.lang.OutOfMemoryError. If you are using eclipse, it is easy to increase the available heap size by using the server configurations. Look at the below steps to configure the VM arguments passed to JVM for running the tomcat server.
1. Open Server Configuration
Double click on the server name to open the configurations.
2. Open Launch Configuration
Click on the Open launch configuration to open the configuration properties.
3. Update VM Arguments
Go to Arguments tab and add the JVM arguments to the field “VM arguments”.