They offer different flash templates with latest features.

Forgot password
Written by:
Score: 12
votes: 17
Format: Article

 How to install Oracle JDK on Linux Mint

Unlinke JRE, Java Development Kit includes various development tools like the Java source compilers, bundling and deployment tools, debuggers, development libraries, etc.

Tutorial about How to install JRE for Linux Mint is almost identical for JDK.

Mint comes with a OpenJDK version of java libraries, which shouldn't be used for example Android development. [1]

1. Open up the Terminal (Alt + F2 > Terminal).

2. Remove OpenJDK installation.

sudo apt-get update && apt-get remove openjdk*

3. Download Oracle JDK from here. You are looking for a linux version with tar.gz extension. Also choose the right version from 32-bit (x86)  and 64bit (x64) one.

4. Change directory into one with downloaded tarball. In my case $HOME/Downloads.

cd ~/Downloads

5. Extract tarball. Replace with a name of dowloaded file. (just press Tab and it will be autocompleted.)

tar -zxvf jdk-

6. As a root create a folder in /opt where jdk will be stored.

sudo mkdir -p /opt/java

7. Move extracted folder to /opt/java. In my case, version number was 1.7.0_25.

sudo mv jdk1.7.0_25 /opt/java

8. Make JDK system default.

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_25/bin/java" 1
sudo update-alternatives --set java /opt/java/jdk1.7.0_25/bin/java

9. Test installed java version.

$ java -version
java version "1.7.0_25" Java(TM) SE Runtime Environment (build 1.7.0_25-b15) Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Optinaly install firefox plugin by linking file to ~/.mozzila/plugins folder.

mkdir -p ~/.mozzila/plugins
ln -s /opt/java/jdk1.7.0_25/jre/lib/amd64/ ~/.mozzila/plugins/

Tags: java jdk oracle firefox plugin
Created: 11 months ago.
Last edited: 11 months ago.
Reviewed: 11 months ago.
Read 0 times.

3 months ago

Great! Concise and to the point. Thank you!

Note that I think you need a 2nd sudo in the JDK removal command set.

Big help for a noob like me! Thanks again!
3 months ago

Needed the assist for correct commands.
3 months ago

Thanks, this helped me too!! :D  
5 months ago

Hi, I am new on linux Mint and this step-by-step helped to set Java and Javac. Thaanks guys.  
6 months ago

Good Tutorial Thanks my friend  
7 months ago

Hi all,
Since we're installing the developer kit, it might be interesting to add links for the developer tools as well :
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java/jdk1.7.0_25/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javadoc" "javadoc" "/opt/java/jdk1.7.0_25/bin/javadoc" 1

Plus, you will usually need to add the following line to .bashrc :
export JAVA_HOME="/opt/java/jdk1.7.0_25/"
7 months ago

Thank you for this great tutorial. Worked perfectly for me.

Noticed one tiny thing. should be .mozilla with one "z" and two "ll". Afraid that is the limit of my abilty to contribute.

7 months ago

Thanks! just what I wanted!  
8 months ago

Thanks a lot Dudko for this tutorial, I used the same steps above and removed the OpenJDK because I needed to open JNLP files for my work applications, and there was IcedTea installed with Mint, removing OpenJDK and installing Oracle JDK worked perfectly with Mozilla Firefox, I needed to use Socks protocol, it did not work with IcedTea, but worked automatically with Oracle Java Plugin.

9 months ago

dear dudko,

many thanks for the post. i am a newbie and would like some help on your posting please. i did what you stated above, but the javac does not work. it says i have install this. any idea how to fix this?
11 months ago

You are C*azy ...  

Other tutorials from dudko

No other tutorials.