我发现 Cassandra 仅支持 JDK17,不支持任何 Java 风格。首先,我安装了 OpenJDK11,并收到了与以下相同的消息。
然后我发现 Cassandra 5.0 仅支持 JDK17。好吧,如果是这样的话,他们可能应该更改消息,但没关系。然后我安装了 OpenJDK17,但仍然收到以下信息。
$ which java
/usr/lib/jvm/java-17-openjdk-amd64/bin/java
$ java -version
openjdk version "17-ea" 2021-09-14
OpenJDK Runtime Environment (build 17-ea+11-Ubuntu-114.042)
OpenJDK 64-Bit Server VM (build 17-ea+11-Ubuntu-114.042, mixed mode, sharing)
vm1@ubuntu:/opt/apache-cassandra-5.0.0/bin$ ./cassandra
Cassandra 5.0 requires Java 11 or Java 17.
然后我尝试使用 Oracle Java 17,结果相同。发生了什么?
$ which java
/usr/lib/jvm/java-17-oracle/bin/java
$ java -version
java version "17.0.6" 2023-01-17 LTS
Java(TM) SE Runtime Environment (build 17.0.6+9-LTS-190)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.6+9-LTS-190, mixed mode, sharing)
vm1@ubuntu:/opt/apache-cassandra-5.0.0/bin$ ./cassandra
Cassandra 5.0 requires Java 11 or Java 17.