Installing java-7-oracle apt-get
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java7-set-default
sudo vim /etc/environment
Agregar: JAVA_HOME="/usr/lib/jvm/java-7-oracle"
O hacer:
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
Installing jdk1.7.0_71 from tar.gz
wget http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.tar.gz
#Download from: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
sudo mv jdk-7u71-linux-x64.tar.gz /usr/lib/jvm/
cd /usr/lib/jvm/
sudo tar zxvf jdk-7u71-linux-x64.tar.gz
sudo rm jdk-7u71-linux-x64.tar.gz
#Now enable Java (by running individually):
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-7-oracle/jre/bin/java 2 auto mode
* 1 /usr/lib/jvm/java-7-oracle/jre/bin/java 2 manual mode
2 /usr/lib/jvm/jdk1.7.0_71/bin/java 1 manual mode
Press enter to keep the current choice[*], or type selection number: 2
sudo update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-7-oracle/bin/javac 2 auto mode
* 1 /usr/lib/jvm/java-7-oracle/bin/javac 2 manual mode
2 /usr/lib/jvm/jdk1.7.0_71/bin/javac 2 manual mode
Press enter to keep the current choice[*], or type selection number: 2
sudo update-alternatives --config javaws
There are 2 choices for the alternative javaws (providing /usr/bin/javaws).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-7-oracle/jre/bin/javaws 2 auto mode
* 1 /usr/lib/jvm/java-7-oracle/jre/bin/javaws 2 manual mode
2 /usr/lib/jvm/jdk1.7.0_71/bin/javaws 2 manual mode
Press enter to keep the current choice[*], or type selection number: 2
#sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_71/bin/java" 2
#sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_71/bin/javac" 2
#sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_71/bin/javaws" 2
sudo vim /etc/environment
Agregar: JAVA_HOME="/usr/lib/jvm/jdk1.7.0_71"
O agregar en el .bashrc:
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_71
Close all browsers.
Create a Mozilla plugins folder in your home directory:
user@host:~$ mkdir ~/.mozilla/plugins/
Create a symbolic link to your Mozilla plugins folder. For 64-bit systems, replace ‘i386’ with ‘amd64’:
user@host:~$ ln -s /usr/lib/jvm/jdk1.7.0_71/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
Testing:
user@host:~$ java -version
Output:
java version "1.7.0_72"
Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode)
javac -version
javac 1.7.0_72
Verify JRE at http://java.com/en/download/installed.jsp.
http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre
ResponderEliminarVery informative error.Thank you author for posting this kind of error .
http://www.wikitechy.com/fix-error/install-sunoracles-proprietary-java-jdk-or-jrk
Both are really good.
Cheers,
Venkat