Search code examples
jvmjvm-argumentsheap-size

Java - Invalid maximum heap size


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


Solution

  • Remove the equals sign after Xmx and Xms.

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