Cassandra 3需要什么版本的Java [英] What version of Java does Cassandra 3 require

查看:131
本文介绍了Cassandra 3需要什么版本的Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Cassandra 2.0,推荐的Java Java版本是Java7。但是,对于Cassandra 3,推荐或要求使用哪个版本(具体来说,是版本3.5)?

The recommended version of Java for Cassandra 2.0 was Java 7. But which version is recommended or required for Cassandra 3 (specifically, version 3.5)?

某些信息表明需要Java 7或Java 8。也就是说,Java 7仍然可以使用:

Some information suggests that Java 7 or Java 8 are required; that is, that Java 7 is still OK:

  • The Cassandra Wiki says:

Cassandra需要Java 7或8的最稳定版本

Cassandra requires the most stable version of Java 7 or 8




  • 更改Cassandra 3.5的日志没有提到更改所需的JRE。它确实有一个变化( CASSANDRA-7028 )为允许在Java中编译8。但是 allow require 不同。

    • The change log for Cassandra 3.5 does not mention changing the required JRE. It does have a change (CASSANDRA-7028) to "Allow compilation in java 8". But allow is not the same as require.
    • 推荐答案

      Cassandra 3.0+需要Java 8。

      Cassandra 3.0+ requires Java 8.

      • The cassandra-env.sh script, used by the cassandra shell script, examines the JVM version and refuses to run if the JVM version is before 1.8.
      • If you try to run code directly using one of the classes of the cassandra-all.jar using a Java 7 environment you will get a java.lang.UnsupportedClassVersionError complaining of Unsupported major.minor version 52.0.
      • The META-INF/MANIFEST.MF file in the JAR indicates it was compiled using a Java 8 compiler: Created-By: 1.8.0_45-b14 (Oracle Corporation).
      • The Datastax announcement about Cassandra 3 says that it requires Java 8.

      最后,Cassandra Wiki是错误的并且Cassandra更改日志具有误导性。

      In conclusion, the Cassandra Wiki is wrong and the Cassandra change log is misleading.

      这篇关于Cassandra 3需要什么版本的Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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