Where Java Home Unix
If you are working on Linux box and trying to find out where is the location of installed java folder please use below commands:
- First find if java is installed or not:
- As you see above java command is inside /usr/bin/java but this is not the folder where Java is installed. So let’s do further investigation where java command is linked using /usr/bin/java path:
- Now its clear from above that /usr/bin/java -> /etc/alternatives/java is linked.
- Let’s go further down to check where /etc/alternatives/java is linked:
$ ls -l /etc/alternatives/java
- Finally we found the location of java folder from above is /usr/lib/jvm/java-7-openjdk-i386 because /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java is linked.
- For more information please refer Unbuntu manual here