I try to set initial application memory heap size to 2gb for java 8 VM. I add -Xms2g -Xmx2g
in Program Arguments
section of IntelliJ.
Then I start my application and see that the heap size is less than 1gb.
What do I miss?
The "Program arguments" are the arguments passed to your main
method, not to Java itself. Move these arguments to the "VM options" box.