javalinuxcentos6

Updated java installation cannot be located in centos6


i have to update the Tomcat from 7 to 9 as per VAPT requirements, so i did that on my centos6 linux server. But the tomcat 7 was running with java 1.7 openjdk and when i start tomcat 9 there are no logs.

I researched and realised i need to use a newer java version. So i did yum java update and installed jdk 11 . But the echo JAVA_HOME is empty on the server. How can i find the installation directory or this new java in my os?

I checkthe old java version was at /usr/java but new one is not there or around it. What is the default installation of java in centos6 ??


Solution

  • To get all installed java version give command : sudo alternatives --config java , this will list all available java version and you can set default by choosing the correct one. you will also get the actual installation path corresponding to each version and can set your java_home accordingly.
    For more information you can refer here