Unrecognized VM option 'UseParNewGC' , Error: Could not create the Java Virtual Machine

跟風遠走 提交于 2019-11-30 22:25:09

问题


I am trying to start a server using jre 10.0.1 64 bit. There is an obvious change in the settings for the JVM in windows start batch files. With the setting of -XX:+UseParNewGC as the reference point of the error what would this need to be changed to in order to get a JVM server start with java 10 versus the java 8 settings I have shown?

The line of code causing the error reference is:

set JAVA_PARAMETERS=-XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10

回答1:


This collectors was deprecated in JDK 9 and removed in JDK 10.

https://bugs.openjdk.java.net/browse/JDK-8151084

The new default is the G1 collector and I suggest you see if that suits your needs.




回答2:


A follow up to Peter's answer, the flag is

-XX:+UseG1GC

as described at Oracle



来源:https://stackoverflow.com/questions/49962437/unrecognized-vm-option-useparnewgc-error-could-not-create-the-java-virtual

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