9 Sep 2015
My script when I installed JAVA in my Ubuntu 14.04 64-bit
~$ sudo apt-add-repository ppa:webupd8team/java
~$ sudo apt-get update
~$ sudo apt-get install oracle-java8-installer
13 Mar 2015
This was my script when I installed JAVA SE JDK in my Ubuntu 14.04LTS.
- wget -c http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-i586.tar.gz
- cp -r jdk-8u40-linux-i586.tar.gz /usr/local/java/
- sudo cp -r jdk-8u40-linux-i586.tar.gz /usr/local/java/
- cd /usr/local/java
- sudo tar xvzf jdk-8u40-linux-i586.tar.gz
- sudo gedit /etc/profile ## and append the following:
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export PATH
- sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_40/bin/java" 1
- sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_40/bin/javac" 1
- sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.8.0_20/bin/javaws" 1
- sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.8.0_40/bin/javaws" 1
- sudo update-alternatives --set java /usr/local/java/jdk1.8.0_40/bin/java
- sudo update-alternatives --set javac /usr/local/java/jdk1.8.0_40/bin/javac
- sudo update-alternatives --set javaws /usr/local/java/jdk1.8.0_40/bin/javaws
- source /etc/profile
- cd /usr/lib/mozilla/plugins ## create if none
- sudo ln -s /usr/local/java/jdk1.8.0_40/jre/lib/i386/libnpjp2.so
- java -version
- javac -version
- sudo reboot
Source: http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux
No comments:
Post a Comment