2
votes

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.

2

2 Answers

7
votes

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

1
votes

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.