diff --git a/doc/modules/cassandra/pages/new/java11.adoc b/doc/modules/cassandra/pages/new/java11.adoc index ded5c2eab18c..685e4e2f9161 100644 --- a/doc/modules/cassandra/pages/new/java11.adoc +++ b/doc/modules/cassandra/pages/new/java11.adoc @@ -9,47 +9,34 @@ After Java 8 the next LTS version is Java 11. Java 9, 10, 12 and 13 are all non-LTS versions. One of the objectives of the Apache Cassandra 4.0 version is to support -the recent LTS Java versions 8 and 11 +the LTS Java version 11 (https://issues.apache.org/jira/browse/CASSANDRA-9608[CASSANDRA-9608]). -Java 8 and Java 11 may be used to build and run Apache Cassandra 4.0. Effective Cassandra +Java 11 may be used to build and run Apache Cassandra 4.0. Effective Cassandra 4.0.2 there is full Java 11 support, it is not experimental anymore. == Support Matrix -The support matrix for the Java versions for compiling and running -Apache Cassandra 4.0 is detailed in Table 1. The build version is along -the vertical axis and the run version is along the horizontal axis. - -Table 1 : Support Matrix for Java - -[width="68%",cols="34%,30%,36%",] -|=== -| |Java 8 (Run) |Java 11 (Run) -|Java 8 (Build) |Supported |Supported -|Java 11(Build) |Not Supported |Experimental -|=== - Apache 4.0 source code built with Java 11 cannot be run with -Java 8. +Java 8. We support it being run only on Java 11 at the moment. -All binary releases are built with Java 8. +All binary releases are built with Java 11. -Next, we shall discuss using each of Java 8 and 11 to build and +Next, we shall discuss using Java 11 to build and run Apache Cassandra 4.0. -== Using Java 8 to Build +== Using Java 11 to Build -To start with, install Java 8. As an example, for installing Java 8 on +To start with, install Java 11. As an example, for installing Java 11 on RedHat Linux the command is as follows: .... -$ sudo yum install java-1.8.0-openjdk-devel +$ sudo yum install java-11-openjdk .... Set the environment variables `JAVA_HOME` and `PATH`. .... -$ export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk +$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk $ export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin .... @@ -76,7 +63,7 @@ $ cd ~/cassandra $ ant .... -Apache Cassandra 4.0 gets built with Java 8. Set the environment +Apache Cassandra 4.0 gets built with Java 11. Set the environment variable for `CASSANDRA_HOME` in the bash script. Also add the `CASSANDRA_HOME/bin` to the `PATH` variable. @@ -85,7 +72,7 @@ $ export CASSANDRA_HOME=~/cassandra $ export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$CASSANDRA_HOME/bin .... -To run Apache Cassandra 4.0 with either of Java 8 or Java 11 run the +To run Apache Cassandra 4.0 with Java 11 run the Cassandra application in the `CASSANDRA_HOME/bin` directory, which is in the `PATH` env variable. @@ -129,56 +116,6 @@ INFO [main] 2019-07-31 21:18:20,921 StorageService.java:2508 - Node 127.0.0.1:7 jump to NORMAL .... -== Using Java 11 to Build - -If Java 11 is used to build Apache Cassandra 4.0, first Java 11 must be -installed and the environment variables set. As an example, to download -and install Java 11 on RedHat Linux run the following command. - -.... -$ yum install java-11-openjdk-devel -.... - -Set the environment variables `JAVA_HOME` and `PATH`. - -.... -$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk -$ export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin -.... - -The build output should now include the following. - -.... -[echo] Non default JDK version used: 11 -... -... -_build_java: - [echo] Compiling for Java 11 -... -... -build: - -_main-jar: - [copy] Copying 1 file to /home/ec2-user/cassandra/build/classes/main/META-INF - [jar] Building jar: /home/ec2-user/cassandra/build/apache-cassandra-4.0-SNAPSHOT.jar -... -... -_build-test: - [javac] Compiling 739 source files to /home/ec2-user/cassandra/build/test/classes - [copy] Copying 25 files to /home/ec2-user/cassandra/build/test/classes -... -... -jar: - [mkdir] Created dir: /home/ec2-user/cassandra/build/classes/stress/META-INF - [mkdir] Created dir: /home/ec2-user/cassandra/build/tools/lib - [jar] Building jar: /home/ec2-user/cassandra/build/tools/lib/stress.jar - [mkdir] Created dir: /home/ec2-user/cassandra/build/classes/fqltool/META-INF - [jar] Building jar: /home/ec2-user/cassandra/build/tools/lib/fqltool.jar - -BUILD SUCCESSFUL -Total time: 1 minute 3 seconds -.... - == Common Issues The Java 11 built Apache Cassandra 4.0 source code may be run with Java