I have installed openjdk-8, so i can successfully check:
seva@seva-HLYL-WXX9:~$ java -version
openjdk version "1.8.0_432"
OpenJDK Runtime Environment (build 1.8.0_432-8u432-ga~us1-0ubuntu2~24.04-ga)
OpenJDK 64-Bit Server VM (build 25.432-bga, mixed mode)
seva@seva-HLYL-WXX9:~$ echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64
seva@seva-HLYL-WXX9:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/opt/idea-IU-243.22562.218/bin:/usr/java/jdk1.8.0_431/bin:/opt/idea-IU-243.22562.218/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin
I also have installed cassandra 4.0 how its was described in documentation. But when i run cassandra
or nodetool
then i receive message:
seva@seva-HLYL-WXX9:~$ sudo cassandra
Unable to find java executable. Check JAVA_HOME and PATH environment variables.