Unrecognized option: -MaxMetaspaceSize=256m

与世无争的帅哥 提交于 2021-01-28 05:00:23

问题


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.


回答1:


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




回答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.



来源:https://stackoverflow.com/questions/32008475/unrecognized-option-maxmetaspacesize-256m

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!