-
Download JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html
-
Unpack archive (name of archive could be different due to newest JDK version):
tar -xvf ./jdk-7u9-linux-i586.tar.gz
-
Create directory for JDK:
sudo mkdir /usr/lib/jvm/java-7u9-jdk-i586
-
Move new JDK to the target directory:
sudo mv ./jdk1.7.0_09/* /usr/lib/jvm/java-7u9-jdk-i586
-
Maintain symbolic links determining default commands for Java:
-
Add JDK targets:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-7u9-jdk-i586/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-7u9-jdk-i586/bin/javac" 1 sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/java-7u9-jdk-i586/bin/javaws" 1
-
Activate JDK tardets:
sudo update-alternatives --config java sudo update-alternatives --config javac sudo update-alternatives --config javaws
-
Activate Java plugin for Mozilla (and Cromium as well):
-
Create plugin directory:
mkdir ./.mozilla/plugins
-
Create symlink:
ln -s /usr/lib/jvm/java-7u9-jdk-i586/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
Created
May 22, 2013 13:22
-
-
Save faleev/5627504 to your computer and use it in GitHub Desktop.
Install JDK on Ubuntu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment