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:

this is my first time using linux ubuntu. I'm trying to install java, i downloaded the file from the java website, extracted the file to the desktop and the extracted file's name now is jre1.7.0_45

i'm following this to install the java

but omg i can't even get past number 2. i get

Reading package lists... Done
Building dependency tree
E: Unable to locate package openjdk-7-jre

how can i do this please?

share|improve this question

marked as duplicate by Jorge Castro, Eric Carvalho, Radu Rădeanu, Seth, psusi Dec 11 '13 at 16:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

have you ran sudo apt-get update ??? – Arno van der Weijden Dec 4 '13 at 23:29
@ArnovanderWeijden i didn't, what is that for? – Alisha Dec 4 '13 at 23:29
ah ok i see whats it for, and then after i run that? do i run the sudo apt-get install openjdk-7-jre ? – Alisha Dec 4 '13 at 23:35
What Ubuntu release are you running? And please clarify, do you want to install OpenJDK or Oracle Java? – xangua Dec 4 '13 at 23:36
I read in the other comments that you were successful in installing flash. If you still want to resolve this problem your describing above comment and I'll help but I believe you're using the ubuntu software center or are using something else so a reboot should suffice if closing everything does not work – Arno van der Weijden Dec 5 '13 at 20:22
up vote 1 down vote accepted

To add a PPA and install(and recieve updates) the latest Oracle Java 7 in Ubuntu (supports Ubuntu 13.10, 13.04, 12.10, 12.04 and 10.04) use the commands below:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer


share|improve this answer
Could you explain the commands you wrote? I know an explanation is in the link but if the link breaks then there isn't one anymore. So please explain the commands in the answer. You can add the explanation below. Just describe what each command do, and why you need to do it perhaps. – Alvar Dec 5 '13 at 1:03
wow great it's installing now, i'll update in a minute once its done! :) – Alisha Dec 5 '13 at 17:59
its installed! THANK YOU! – Alisha Dec 5 '13 at 18:03

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