I am getting the following exception repeatedly each time I try to run the program.
Error occurred during initialization of VM Could not reserve e
Error occurred during initialization of VM
Could not reserve e
Suppose your class is called Test in package mypackage. Run your code like this:
Test
mypackage
java -Xmx1024m mypackage.Test
This will reserve 1024 MB of heap space for your code. If you want 512 MB, you can use:
java -Xmx512m mypackage.Test
Use little m in 1024m, 512m, etc
1024m
512m