当我在 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盘。谁能帮我解决这个问题吗?
最佳答案
您有 2 个问题:
- Windows 明确要求您执行
powershell Set-ExecutionPolicy Unrestricted
才能运行启动脚本 - 您使用的是 Cassandra 3.11 不支持的 Java 15 - 它仅适用于 Java 8,因此您需要降级 Java
附注我建议在 Windows 上的 Docker 中运行 Cassandra - 您将避免许多问题,因为 Windows 不是 Cassandra 的积极支持平台,并且 its support could be removed in the future .
关于cassandra - 设置 apache-cassandra-3.11.8 时无法识别的 VM 选项 'UseParNewGC' 错误 : Could not create the Java Virtual Machine.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64237048/