无法识别的VM选项'UseParNewGC'错误:无法创建Java虚拟机。在设置apache-Cassandra-3.11.8时 [英] Unrecognized VM option 'UseParNewGC' Error: Could not create the Java Virtual Machine. while setting apache-cassandra-3.11.8

查看:0
本文介绍了无法识别的VM选项'UseParNewGC'错误:无法创建Java虚拟机。在设置apache-Cassandra-3.11.8时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在cmd上键入cassandra时收到此错误消息。

WARNING! Powershell script execution unavailable.
   Please use 'powershell Set-ExecutionPolicy Unrestricted'
   on this user-account to run cassandra with fully featured
   functionality on this platform.
Starting with legacy startup options
Starting Cassandra Server
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

我的Java版本是

java version "15" 2020-09-15
Java(TM) SE Runtime Environment (build 15+36-1562)
Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)

我使用的是Windows 10,两者都安装在C盘上。有人能帮我解决这个问题吗?

推荐答案

您有两个问题:

  1. Windows明确说明您必须执行powershell Set-ExecutionPolicy Unrestricted才能运行启动脚本
  2. 您使用的Java 15不受Cassandra 3.11支持-它只能与Java 8一起使用,因此您需要降级Java

附注:我建议在Windows上的Docker中运行Cassandra-您将避免许多问题,因为Windows不是非常受Cassandra和its support could be removed in the future支持的平台。

这篇关于无法识别的VM选项'UseParNewGC'错误:无法创建Java虚拟机。在设置apache-Cassandra-3.11.8时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆