Sunday, December 29, 2013

Linux: Locate JDK/JRE directory

1. Try to type "java -version" in terminal.
if it's works continue with step 2.
else check if you already install java.
     [install java : $ su -c "yum install java-1.7.0-openjdk"]

2. Then type "readlink -f $(which java)"
else check if you already install java.

It will display with line below:
[root@localhost bin]# readlink -f $(which java)
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.45/jre/bin/java

No comments: