Linux – the value of JAVA_HOME for CentOS

centosjavalinuxredhatyum

I have install java through yum on CentOS, however another java programme needs to know what the JAVA_HOME environmental variable is. I know all about setting environmental variables, but what do I set it to? java is installed in /usr/bin/java, it can't be there!

Best Answer

Actually I found it,

it's /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/. I found out what it was by doing update-alternatives --display java and it showed me the directory /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java