i installed java jdk on my RHEL 8 system. But I cannot see it in my browser. When I test browser for java it says Java is not installed.
# dnf install java-21-openjdk.x86_64
# java -version
openjdk version "21.0.6" 2025-01-21 LTS
OpenJDK Runtime Environment (Red_Hat-21.0.6.0.7-1) (build 21.0.6+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.6.0.7-1) (build 21.0.6+7-LTS, mixed mode, sharing)
There is no java.conf file on system.
I have put following in my .bashrc as asked in net elsewhere:
$ readlink -f $(which java)
/usr/lib/jvm/java-21-openjdk-21.0.6.0.7-1.el8.x86_64/bin/java
$ printenv|grep -i java
JAVA_HOME=/usr/lib/jvm/java-21-openjdk-21.0.6.0.7-1.el8.x86_64/
$ firefox&
[1] 2475911
Answer
Java in browsers is not a thing since last decade. It was removed since Java 9. See the reasons in Why were applets deprecated in JDK 9?
If you see Java in a browser today you are exposed to a security risk. Fortunately modern browsers and Java/JDK versions do not support that anymore.