you can do a few things:
bash-5.0$ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
bash-5.0$
bash-5.0$
bash-5.0$ which java
/usr/lib64/java/bin/java
bash-5.0$ echo $JAVA_HOME
/usr/lib64/java
bash-5.0$
also slackware:
ls /var/log/packages | grep jdk
jdk-8u231-x86_64-1_SBo
bash-5.0$
so i have 8u231 installed