0

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 http://www.wikihow.com/Install-Java-on-Ubuntu

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?

Alisha
  • 3,341
  • 2
  • 14
  • 8
  • have you ran sudo apt-get update ??? – Akisame Dec 04 '13 at 23:29
  • @ArnovanderWeijden i didn't, what is that for? – Alisha Dec 04 '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 04 '13 at 23:35
  • What Ubuntu release are you running? And please clarify, do you want to install OpenJDK or Oracle Java? – xangua Dec 04 '13 at 23:36
  • Yes, try running that command and see if it works now. That is if you're running ubuntu 12.04 or higher – Akisame Dec 04 '13 at 23:40
  • If you're running a version lower that 12.04 you'll need to download it manually and install it. http://stackoverflow.com/questions/10471564/installing-openjdk-7-jre-on-ubuntu-10-04-package-openjdk-7-jre-has-no-installa – Akisame Dec 04 '13 at 23:48
  • Also read the answers to the question: How do I install Java?. – karel Dec 04 '13 at 23:53
  • @xangua Ubuntu 13. and on the java, i just clicked the 64 version on the website, when i extracted it i think the file was jre1..... – Alisha Dec 05 '13 at 00:00
  • @ArnovanderWeijden ok i'll try this and let you know what happens – Alisha Dec 05 '13 at 00:01
  • @ArnovanderWeijden when i run sudo apt-get update it says E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) and E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? – Alisha Dec 05 '13 at 17:47
  • 1
    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 – Akisame Dec 05 '13 at 20:22

1 Answers1

1

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

Source http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

xangua
  • 7,217
  • 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 05 '13 at 01:03
  • wow great it's installing now, i'll update in a minute once its done! :) – Alisha Dec 05 '13 at 17:59