Ubuntu and Debian

Ubuntu. Oracle Java 7. Install the Oracle JDK 7. Install the Oracle JRE 7. Install the Firefox/Chrome Oracle Java 7 plugin

Install the JDK

  • Download the 32bit or 64bit Linux "compressed binary file" - it has a ".tar.gz" file extension
  • Uncompress it

    tar -xvf jdk-7u21-linux-i586.tar.gz

JDK 7 package is extracted into ./jdk1.7.0_21 directory. - Now move the JDK 7 directory to /usr/lib

sudo mv jdk1.7.0_21 /usr/lib/jvm/jdk1.7.0_21

  • Now run

sudo update-alternatives --config java

You will get output as:

$sudo update-alternatives –config java There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode


Press enter to keep the current choice[*], or type selection number:

Remember the last number and press enter to exit this utility i.e. in this example remember the number 2.

if only one alternative is shown then remember the number 0

  • Now run

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_21/jre/bin/java 3

This will add your new JDK 7 installation into alternatives list i.e.

use the remembered number + 1 i.e. 3 in the example above.

- Run

sudo update-alternatives --config java 

You will see output similar one below - choose the number of jdk1.7.0_21 i.e. 3:

$sudo update-alternatives –config java

There are 3 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
3 /usr/lib/jvm/jdk1.7.0_21/jre/bin/java 3 manual mode
Press enter to keep the current choice[*], or type selection number:

 
3 update-alternatives: using /usr/lib/jvm/jdk1.7.0_21/jre/bin/java
to provide /usr/bin/java (java) in manual mode.

Check the version of you new JDK 7 installation:

java -version

java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-bxxx)
Java HotSpot(TM) Server VM (build 22.0-b10, mixed mode)

Install the JRE

  • Download the 32bit or 64bit Linux "compressed binary file" - it has a ".tar.gz" file extension
  • Uncompress it

    tar -xvf jre-7u21-linux-i586.tar.gz

JRE 7 package is extracted into ./jre1.7.0_21 directory. - Now move the JRE 7 directory to /usr/lib

sudo mv jre1.7.0_21 /usr/lib/jvm/jre1.7.0_21

  • Now run

sudo update-alternatives --config java

You will get output as:

$sudo update-alternatives –config java

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode

 
Press enter to keep the current choice[*], or type selection number:

Remember the last number and press enter to exit this utility i.e. in this example remember the number 2.

if only one alternative is shown then remember the number 0

  • Now run

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0_21/bin/java 3

This will add your new JRE 7 installation into alternatives list i.e.

use the remembered number + 1 i.e. 3 in the example above.

- Run

sudo update-alternatives --config java 

You will see output similar one below - choose the number of jre1.7.0_21 i.e. 3:

$sudo update-alternatives –config java

There are 3 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
3 /usr/lib/jvm/jre1.7.0_21/jre/bin/java 3 manual mode


Press enter to keep the current choice[*], or type selection number:

3 update-alternatives: using /usr/lib/jvm/jre1.7.0_21/jre/bin/java to provide /usr/bin/java (java) in manual mode.

N.B. if there was no previous java installation then the new JRE will be the default and you will not see the above.

Check the version of you new JRE 7 installation:

java -version

java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-bxxx)
Java HotSpot(TM) Server VM (build 22.0-b10, mixed mode)

Install the Firefox/Chrome plugin

In a terminal:

mkdir ~/.mozilla/plugins 

Remove the IcedTea plugin, if it has been installed.

sudo apt-get remove icedtea6-plugin 

Remove a former version of the Java plugin (may or may not be present)

sudo rm ~/.mozilla/plugins/libnpjp2.so 

Now you can install the plugin, by creating a symbolic link (you tell Firefox, where the plugin is located).

sudo ln -s /usr/lib/jvm/jre1.7.0_21/lib/i386/libnpjp2.so ~/.mozilla/plugins/ 

Confirm that the JRE has been successful by using the official oracle website.

 --------------------------------------------------------------------------------------------------------------------------

Install / upgrade to the latest Oracle Java (JDK) 7 in Ubuntu via ppa:webupd8team/java

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

Share this post

Submit to Google BookmarksSubmit to TwitterSubmit to LinkedIn

playbet

playbet.com

H Playbet προσφέρει νόμιμα τις υπηρεσίες της στους παίκτες που κατοικούν στην Ελληνική επικράτεια, έχοντας πραγματοποιήσει έναρξη εργασιών για υπηρεσίες παροχής τυχερών παιγνίων μέσω διαδικτύου, αποκτώντας Ελληνικό ΑΦΜ, και έχοντας ενταχθεί οικειοθελώς στη μεταβατική διάταξη της παραγράφου 12 του άρθρου 50 του ν.4002/2011 (Α180).

Αθηναϊκό Κέντρο Επικοινωνιών Πληροφόρησης ΑΚΕΠ ΑΕ. Πληροφορίες για Διαγωνισμούς Προμηθειών Δημοσίου Δήμων και Κοινοτήτων. Εδώ θα βρείτε έγκυρη, έγκαιρη και αξιόπιστη Ενημέρωση σχετικά με τους διαγωνισμούς του Δημοσίου που αφορούν Προμήθειες, Τεχνικά έργα, Μελέτες, Εκποιήσεις και Εργολαβίες, σε ένα γρήγορο και φιλικό προς το χρήστη περιβάλλον.
Τηλεφωνική γραμμή πληροφόρησης των Πολιτών, σχετικά με τις διαδικασίες και τα πιστοποιητικά της Δημόσιας Διοίκησης.
logo14500Apps
logo14900Small
  • Ζωντανά 24 ώρες το 24ωρο
  • Προγραμματίστε το ραντεβού με Ιατρό στις μονάδες υγείας του ΕΟΠΥΥ
  • Ακυρώστε το ραντεβού σας
  • Ενημερωθείτε αναφορικά με συμβεβλημένους ιατρούς, διαγνωστικά κέντρα, λίστες φαρμάκων και φαρμακείων του ΕΟΠΥΥ
logo14884Small
  • Ζωντανά 24 ώρες το 24ωρο
  • Προγραμματίστε το ραντεβού με Ιατρό στις μονάδες υγείας του ΕΟΠΥΥ
  • Ακυρώστε το ραντεβού σας
  • Ενημερωθείτε αναφορικά με συμβεβλημένους ιατρούς, διαγνωστικά κέντρα, λίστες φαρμάκων και φαρμακείων του ΕΟΠΥΥ