Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I want to set up Java in my PC running Ubuntu 12.4 LTS with 64 bit architecture. I followed different posts on this site to do the same but I am confused, whilst I try to navigate to usr/lib/jvm I see a lot of folders at this point. Which one to set as path? I have attached a screen shot to explain my issue:

enter image description here

EDIT: I have java installed but I am stuck at setting the Home for Java. I executed Java -version on my terminal and I had the following output:

root@pc-dev-a147:/# java -version
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.4)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

EDIT: I think I solved the problem. These are the steps I took to gain the know how of how to do it:

1) To check if I have Java or I have to install it.

2) What does this mysterious HOME enviornment variable do?

3) Finally how to locate and set the variable.

Now if I do echo $JAVA_HOME I get:

root@pc-dev-a147:/home/Johndoe/Downloads/Softwares/FlashTool# echo $JAVA_HOME

However I am stuck in a different issue now which is explained Here

share|improve this question

marked as duplicate by Braiam, Eric Carvalho, Alvar, Radu Rădeanu, Avinash Raj Jan 5 '14 at 3:21

This question was marked as an exact duplicate of an existing question.

WHat after whereis? It gives me something like: java: /usr/bin/java /etc/java /usr/lib/java /usr/bin/X11/java /usr/share/java /usr/share/man/man1/java.1.gz. So do I need to take any further action? Sorry I am new to Ubuntu, please bear with me. – Skynet Jan 4 '14 at 5:22
How did you installed Java? Also, don't java appears when you type java -version? – Braiam Jan 4 '14 at 12:00
For some reason I don't remember how I installed Java. – Skynet Jan 4 '14 at 13:57

Browse other questions tagged or ask your own question.