Unrecognized option: -MaxMetaspaceSize=256m

16,786

Solution 1

The correct name of the parameter is -XX:MaxMetaspaceSize.

Solution 2

From java 8, PermSize and MaxPermSize JVM arguments are ignored and replaced by MetaspaceSize and MaxMetaspaceSize.

The Maximum metaspace size can be set using the -XX:MaxMetaspaceSize flag,and the default is unlimited,which means that only your system memory is the limit and for PermSize use -XX:MetaspaceSize.

Share:
16,786

Related videos on Youtube

Les
Author by

Les

I LIKE SENSELESS BAGES! SENSELESS BAGES I LIKE !

Updated on June 04, 2022

Comments

  • Les
    Les almost 2 years

    While ordinary run under IDEA I've got:

    /usr/lib/jvm/java-8-oracle/jre/bin/java ...

    Unrecognized option: -MaxMetaspaceSize=256m
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.

    Process finished with exit code 1

    Why can't I add the -MaxMetaspaceSize=256m JVM property?


    Additional info:

    echo $JAVA_HOME

    /usr/lib/jvm/java-8-oracle/lib

    sudo update-alternatives --config java

    There are 2 choices for the alternative java (providing /usr/bin/java).

    Selection Path Priority


    • 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 9 auto mode
      1 /usr/lib/jvm/java-7-oracle/jre/bin/java 8 manual mode

    The same for javac & javaws, project settings, module, default settings are using jre8 & javac8.