1. Start a terminal and type: sudo su.
2. Determine the folder in which Java is installed. To do this, enter: which java.
3. Now, to install JAVA_HOME for all users, edit the bash.bashrc file
4. At the end of the file, enter the following lines (one after the other):
Line 1: JAVA_HOME=/usr/lib/jvm/java-6-sun
Line 2: export JAVA_HOME
Line 3: PATH=$PATH:$JAVA_HOME
Line 4: export PATH
5. Close terminal, then open it again and type: echo $JAVA_HOME; a new path will be displayed.
6. Enter: java –version to find out the version of Java installed.
If you still have proble