Archive for February 2012

JAVA_HOME on linux (at least for compiling ruby-hdfs)

Posting this as the links I found for setting JAVA_HOME seemed to erroneously state to set it to the full path to the java executable. I’m not sure if there is a case where you would want to do that, but if you want to compile the ruby gem ruby-hdfs, then JAVA_HOME should be set to the directory above where the java binary is located, ie

export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/

where the java executable is located at /usr/lib/jvm/java-6-sun-1.6.0.24/bin/java. Then the install is straightforward

$ gem install ruby-hdfs
Building native extensions. This could take a while...
Successfully installed ruby-hdfs-0.1.0
1 gem installed