On a freshly installed box, Java was not installed, so I installed openjdk-6 via apt-get install openjdk-6-jre openjdk-6-jdk. When I try to start my Hadoop service, it complains that JAVA_HOME is not set.

Is there something that needs to be done to get JAVA_HOME set for all users?


Installing the packages typically sets up symlinks to the common Java binaries as /usr/bin/java, etc. and that's sufficient for most Java applications.

Some still want the legacy JAVA_HOME and for something like Hadoop, the best place to set it is in the global environment config file /etc/environment ; it will then be available in the console (TTY), terminals and the desktop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.