Cassandra 3需要什么版本的Java [英] What version of Java does Cassandra 3 require
本文介绍了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:
- Cassandra Wiki 说:
- 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-env.sh $
cassandra
shell脚本使用的c $ c>脚本检查JVM版本,如果JVM版本低于1.8,则拒绝运行。 - 如果您尝试使用Java 7环境使用
cassandra-all.jar
的类之一直接运行代码,则会得到java.lang.UnsupportedClassVersionError
抱怨不支持的major.minor版本52.0
。 -
META-INF / MANIFEST.MF
JAR中的文件表明它是使用Java 8编译器编译的:创建对象:1.8.0_45-b14(Oracle公司)
。 - 有关Cassandra 3的Datastax声明说它需要Java 8。
- The
cassandra-env.sh
script, used by thecassandra
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 ajava.lang.UnsupportedClassVersionError
complaining ofUnsupported 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 3.0+需要Java 8。
Cassandra 3.0+ requires Java 8.
最后,Cassandra Wiki是错误的并且Cassandra更改日志具有误导性。
In conclusion, the Cassandra Wiki is wrong and the Cassandra change log is misleading.
这篇关于Cassandra 3需要什么版本的Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文