Java

Switching between different versions of Java on Ubuntu

http://askubuntu.com/questions/64329/how-to-replace-openjdk-6-with-openjdk-7

$ update-java-alternatives -l
java-1.6.0-openjdk 1061 /usr/lib/jvm/java-1.6.0-openjdk
java-1.7.0-openjdk-amd64 1051 /usr/lib/jvm/java-1.7.0-openjdk-amd64
$ sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

Installing Oracle JDK 6

via http://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6

Download the 32bit or 64bit Linux "compressed binary file" - it has a ".bin" file extension

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Give it permissions to execute and extract it

  chmod a+x [version]-linux-i586.bin
./[version]-linux-i586.bin

Lets rename it:

  mv jdk1.6.0_33 java-6-oracle

Now move the JDK 6 directory to /usr/lib

  sudo mkdir /usr/lib/jvm
sudo mv java-6-oracle /usr/lib/jvm

switch to Oracle JDK 6

webupd8.googlecode.com hosts a nice-easy script to help with this.

  wget http://webupd8.googlecode.com/files/update-java-0.5b
chmod +x update-java-0.5b
sudo ./update-java-0.5b

Installing Java browser plugin from Oracle on Ubuntu 11.10

To see Java demos on Processing I needed to install Java plugin. I downloaded jre [Linux (self-extracting file) filesize: 20.7 MB] and followed the instructions, copied the extracted directory to /usr/java and linked:

ln -s /usr/java/jre1.6.0_29/lib/i386/libnpjp2.so ~/.mozilla/plugins/

This was done based on instructions from:

http://ubuntu-answers.blogspot.com/2011/11/ubuntu-1110-java-installation.html

Last edited by Artem Dudarev, 2013-10-13 02:01:37. Edit