reference: http://www.itworld.com/software/305913/install-oracle-java-7-ubuntu-1210

To install JRE 7:

1. Open a terminal window.

2. Type in the following commands then hit Enter after each.

sudo sh -c “echo ‘deb http://www.duinsoft.nl/pkg debs all’ >> /etc/apt/sources.list”

sudo apt-get update

sudo apt-key adv –keyserver keys.gnupg.net –recv-keys 5CB26B26

sudo apt-get update

sudo apt-get install update-sun-jre

To install JDK 7 on i386 32-bit systems:

1. Open a terminal window.

2. Type in the following commands then hit Enter after each.

cd /tmp

wget -c –no-cookies –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com” “http://goo.gl/g9cJl” -O jdk-7u7-nb-7_2-linux-i586-ml.sh

chmod +x jdk-7u7-nb-7_2-linux-i586-ml.sh

sudo sh jdk-7u7-nb-7_2-linux-i586-ml.sh

To install JDK 7 on AMD 64-bit systems:

cd /tmp

wget -c –no-cookies –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com” “http://goo.gl/AJ1oS” -O jdk-7u7-nb-7_2-linux-x64-ml.sh

chmod +x jdk-7u7-nb-7_2-linux-x64-ml.sh

sudo sh jdk-7u7-nb-7_2-linux-x64-ml.sh

When the install is complete, use these commands:

sudo mkdir -p /usr/lib/jvm/

sudo cp -R /usr/local/jdk1.7.0* /usr/lib/jvm/

sudo update-alternatives –install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_07/bin/javac 1

sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_07/bin/java 1

About these ads