Windows启动RocketMq报错:Unrecognized VM option ‘UseCMSCompactAtFullCollection‘

Posted 猩猩之火

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows启动RocketMq报错:Unrecognized VM option ‘UseCMSCompactAtFullCollection‘相关的知识,希望对你有一定的参考价值。

rocketmq下载地址:Downloading the Apache RocketMQ Releases - Apache RocketMQ

 环境

系统        windows 10 64位
jdk版本jdk11
RocketMQ版本5.0

问题:

下载完后解压包,启动cmd文件时,出现如下错误提示:

解决方案:

1、更改jdk版本至9以下。9及以上版本废弃了CMSCompactAtFullCollection,无法支持。 

2、删掉jvm不支持的参数:打开runserver.cmd编辑;或者注释掉这行。

 可能还会出现其他不支持的类:PrintGCDateStamps、PrintGCTimeStamps等都是这么处理。

Unrecognized VM option '<Option>'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

还有些在 JDK 9 中不再工作的 50 个选项列表。检查下你是否在命令行和启动脚本中使用了这些选项:

  • AdjustConcurrency

  • CMSCompactWhenClearAllSoftRefs

  • CMSDumpAtPromotionFailure

  • CMSFullGCsBeforeCompaction

  • CMSIncrementalDutyCycle

  • CMSIncrementalDutyCycleMin

  • CMSIncrementalMode

  • CMSIncrementalOffset

  • CMSIncrementalPacing

  • CMSParPromoteBlocksToClaim

  • CMSPrintEdenSurvivorChunks

  • CollectGen0First

  • GCLogFileSize

  • NumberOfGCLogFiles

  • ParallelGCVerbose

  • PrintAdaptiveSizePolicy

  • PrintCMSInitiationStatistics

  • PrintCMSStatistics

  • PrintClassHistogramAfterFullGC

  • PrintClassHistogramBeforeFullGC

  • PrintFLSCensus

  • PrintFLSStatistics

  • PrintGCApplicationConcurrentTime

  • PrintGCApplicationStoppedTime

  • PrintGCCause

  • PrintGCDateStamps

  • PrintGCTaskTimeStamps

  • PrintGCTimeStamps

  • PrintHeapAtGC

  • PrintHeapAtGCExtended

  • PrintJNIGCStalls

  • PrintOldPLAB

  • PrintPLAB

  • PrintParallelOldGCPhaseTimes

  • PrintPromotionFailure

  • PrintReferenceGC

  • PrintTLAB

  • PrintTenuringDistribution

  • TraceDynamicGCThreads

  • TraceGen0Time

  • TraceGen1Time

  • TraceMetadataHumongousAllocation

  • TraceParallelOldGCTasks

  • UseCMSCollectionPassing

  • UseCMSCompactAtFullCollection

  • UseGCLogFileRotation

  • UseMemSetInBOT

  • UsePPCLWSYNC

  • UseVMInterruptibleIO

  • WorkAroundNPTLTimedWaitHang

以上是关于Windows启动RocketMq报错:Unrecognized VM option ‘UseCMSCompactAtFullCollection‘的主要内容,如果未能解决你的问题,请参考以下文章

Windows启动RocketMq报错:Unrecognized VM option ‘UseCMSCompactAtFullCollection‘

rocketmq的windows版客户端的启动步骤

Windows 下安装 RocketMQ

Windows 下安装 RocketMQ

Windows 下安装 RocketMQ

Windows下RocketMQ的启动步骤