Please Verify Flume Installation JAVA HOME


I am installing flume now to do the class project on CDH4. Can you please verify if the JAVA_HOME path is correct? Your document shows JAVA_HOME as:


But there is no such directory. When I list, I get the following subdiretories under jvm directory:

bin  include  jre  lib

bin  include  jre  lib

bin  include  jre  lib

bin  include  jre  lib

bin  include  jre  lib
[root@localhost jvm]# 

Which one should be set to JAVA_HOME?

3 Answer(s)


Hi Lokesh,

You can get the Java Home value by two method:

1. Command - $ echo $PATH

     With multiple path seperated by comma, java path will be look like... "/usr/lib/jvm/java......"

2. Command - $ ls -l /usr/lib/jvm/

The output folder name is JAVA_HOME

Hope this helps.



Yes, I saw Java path yesterday (echo $PATH. It shows a different path altogether.


1. The first option (echo $PATH) that you pointed out and it is not under /usr/lib/jvm/.

It is:


2. I already put the output of: ls -l /usr/lib/jvm/

lrwxrwxrwx. 1 root root   26 Oct  7  2013 java -> /etc/alternatives/java_sdk
lrwxrwxrwx. 1 root root   32 Oct  7  2013 java-1.5.0 -> /etc/alternatives/java_sdk_1.5.0
lrwxrwxrwx. 1 root root   22 Oct  7  2013 java-1.5.0-gcj -> java-1.5.0-gcj-
drwxr-xr-x. 6 root root 4096 Oct  7  2013 java-1.5.0-gcj-
lrwxrwxrwx. 1 root root   30 Oct  7  2013 java-gcj -> /etc/alternatives/java_sdk_gcj
lrwxrwxrwx. 1 root root   21 Oct  7  2013 jre -> /etc/alternatives/jre
lrwxrwxrwx. 1 root root   27 Oct  7  2013 jre-1.5.0 -> /etc/alternatives/jre_1.5.0
lrwxrwxrwx. 1 root root   26 Oct  7  2013 jre-1.5.0-gcj -> java-1.5.0-gcj-
lrwxrwxrwx. 1 root root   25 Oct  7  2013 jre-gcj -> /etc/alternatives/jre_gcj


THis is why I got confused. which one should I use?



Hi Lokesh,

Thanks for sharing the command output. This is the JAVA_HOME value:


Hope this helps.