download jdk-8u5-linux-x64.tar.gz download
cp /home/username/Downloads/jdk-8u5-linux-x64.tar.gz /usr/lib/jvm/
cd /usr/lib/jvm
tar xzf jdk-8u5-linux-x64.tar.gz ./
rm jdk-8u5-linux-x64.tar.gz
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_05/bin/java 18
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_05/bin/javac 18
update-alternatives --config java
updata-alternatives --config javac
apt-get install gcc-4.4 gcc-4.4-multilib g++-4.4-multilib g++-4.4
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 44
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 44
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 48
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 48
update-alternatives --config gcc
updata-alternatives --config g++