Java – Invalid maximum heap size

heap-sizejvmjvm-arguments

When running project from IntelliJ IDEA I set VM options -XX:MaxPermSize=512m -Xmx=256m -Xms=256m and get the following error

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Invalid maximum heap size: -Xmx=256m

Best Answer

Remove the equals sign after Xmx and Xms.

Correct VM options: -XX:MaxPermSize=512m -Xmx256m -Xms256m.

Related Topic