Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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