Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized option: -MaxMetaspaceSize=256m

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.

like image 581
Les Avatar asked Jan 29 '26 22:01

Les


2 Answers

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

like image 196
Kayaman Avatar answered Jan 31 '26 10:01

Kayaman


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.

like image 28
Vignesh palanisamy Avatar answered Jan 31 '26 11:01

Vignesh palanisamy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!