Ubuntu/Applications/Java7
From r00tedvw.com wiki
(Difference between revisions)
Line 1: | Line 1: | ||
[[Ubuntu/Install_Apps|Install Applications]] | [[Ubuntu/Install_Apps/Java7|Java7]] | [[Ubuntu/Install_Apps|Install Applications]] | [[Ubuntu/Install_Apps/Java7|Java7]] | ||
<br\> | <br\> | ||
− | http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-6-7-jre-or-jdk | + | http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-6-7-jre-or-jdk<br\> |
+ | https://help.ubuntu.com/community/Java | ||
+ | <br\> | ||
+ | |||
+ | Download Java: | ||
+ | http://download.oracle.com/otn-pub/java/jdk/7u13-b20/jre-7u13-linux-i586.tar.gz | ||
+ | |||
+ | Remove OpenJDK: | ||
+ | sudo apt-get purge openjdk* | ||
+ | |||
+ | Extract downloaded tar: | ||
+ | tar -xvf ~/Downloads/jre-7u13-linux-i586.tar.gz | ||
+ | |||
+ | Move Java to common location: | ||
+ | sudo mv jre1.7.0_13/* /usr/lib/jvm/jre1.7.0/ | ||
+ | |||
+ | Determine current installed java alternatives: | ||
+ | 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: | ||
+ | |||
+ | The above example shows you have (3) variants, 0-2. You'll want to install the next as (3). | ||
+ | <br\> | ||
+ | Update Alternatives with Java 7 | ||
+ | sudo update-alternatives --install /usr/bin/java /java /usr/lib/jvm/jre1.7.0/bin/java 3 | ||
+ | |||
+ | Configure Java: | ||
+ | sudo update-alternatives --config java | ||
+ | select the one that has Java 7 via the number to the far left. | ||
+ | |||
+ | Check Installed Version: | ||
+ | java -version |
Revision as of 19:42, 9 February 2013
Install Applications | Java7
http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-6-7-jre-or-jdk
https://help.ubuntu.com/community/Java
Download Java:
http://download.oracle.com/otn-pub/java/jdk/7u13-b20/jre-7u13-linux-i586.tar.gz
Remove OpenJDK:
sudo apt-get purge openjdk*
Extract downloaded tar:
tar -xvf ~/Downloads/jre-7u13-linux-i586.tar.gz
Move Java to common location:
sudo mv jre1.7.0_13/* /usr/lib/jvm/jre1.7.0/
Determine current installed java alternatives:
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:
The above example shows you have (3) variants, 0-2. You'll want to install the next as (3).
Update Alternatives with Java 7
sudo update-alternatives --install /usr/bin/java /java /usr/lib/jvm/jre1.7.0/bin/java 3
Configure Java:
sudo update-alternatives --config java
select the one that has Java 7 via the number to the far left.
Check Installed Version:
java -version