I am parsing a file which is around 600MB
in size.
Below is memory usage when the file runs
1] When running from Netbeans with -Xms1g
runtime JVM arguments
it takes around 1.03GB memory
(checked from Task Manager)
2] When I directly ran JAR
it took maximum of 1.34GB
(checked from Task Manager) and threw java outofmemory exception
(I have set my JVM Runtime parameters with -Xms2048M
also tried with -Xms1g
)
3] When I run from cmd with JVM arguments -Xms1g
it takes 1.03GB
memory and gives the proper output.
Question :
My JVM run time parameters are set to run on 2gb memory (tried 1gb too) why does it throw outofmemory
even though it gives proper output when the memory is specifically given in the cmd command?