Get Bonus

Install JDK On Linux Mint 16


Java is a programming language and computing platform first released by Sun Microsystems in 1995. Java runs on more than 850 million personal computers worldwide, and on billions of devices worldwide, including mobile and TV devices.

At the time of this writing, we will try to install Oracle Java 8 on Linux Mint or Ubuntu. The trick really easy passable. By default anyway ubuntu / linux mint already provide OpenJDK and openJRE. since the famous Oracle and friends desperately need JDK for Java Programming etc then I made a tutorial using Java Oracle.

The first thing you need to do is download the files from Oracle's JDK and JRE which is located here
Ok, once you download this file, it is time to install. Please follow the instructions below .. (NB: Here I install JDK and JRE versions of x86 to Linux Mint 16)

1 .first Check  java version of what you have at this time by typing the following command in the terminal linux.

java -version
If the result more or less like this, it means you are installed ubuntu OpenJDK and openJRE
java -version
java version “1.6.0_21?
OpenJDK Runtime Environment (IcedTea6 1.10pre) (6b21~pre1-0lucid1)
OpenJDK 32-Bit Server VM (build 19.0-b09, mixed mode)
2.if it comes out as above, then you need to uninstall the OpenJDK first. You simply type in the following command in the terminal
sudo apt-get purge openjdk-\*
3.The next step is to create a directory that will accommodate java file that will be installed
sudo mkdir -p /usr/local/java
4.Now we copy the downloaded Oracle Java earlier to the / usr / local / java we have made in step 3 earlier. (I assume the downloaded file is located in the Downloads folder)
sudo -s
cd Downloads
cp -r jdk-8u25-linux-i586.tar.gz /usr/local/java
cd /usr/local/java
5.Now we change the permissions on the file was to be executed.
sudo chmod a+x jdk-8u25-linux-i586.tar.gz
6.Then we extract the two files
tar xvzf jdk-8u25-linux-i586.tar.gz
the extracted earlier, then will generate a folder. Ie folder jdk-8u25-linux-i586 / i 7.Edit file profile on folder /etc
sudo pico /etc/profile
8.Sytax type the following at the bottom
sudo pico /etc/profile
JAVA_HOME=/usr/local/java/jdk-8u25-linux-i586
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
JAVA_HOME=/usr/local/java/jdk-8u25-linux-i586/jre
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
And then Save by pressing CTRL + O and exit by pressing CTRL + X 9.Inform to machine ubuntu jdk oracle installation locations:
sudo update-alternatives --install “/usr/bin/java” “java” “/usr/local/java/jdk-8u25-linux-i586/jre/bin/java” 1

sudo update-alternatives --install “/usr/bin/javac” “javac” “/usr/local/java/jdk-8u25-linux-i586/bin/javac” 1

10.Inform to ubuntu machine that oracle java JDK / JRE is the default java
sudo update-alternatives --set java /usr/local/java/jdk-8u25-linux-i586/jre/java

sudo update-alternatives --set javac /usr/local/java/jdk-8u25-linux-i586/bin/javac
11.Reload system PATH using command :
halim@halim_xda ~ $ . /etc/profile

12.Test, whether java is installed properly or not. Type the following command
halim@halim_xda ~ $ java -version
Previous
Next Post »