How-to: Install the Latest Version of Oracle Java on Your Linux Distro

Oracle Java Logo

Maybe it happened to you that you need to have installed the latest version of java In your GNU / Linux distro and from the repositories of your distribution, installing it with the package managers, the only thing you get is a previous version that is the one that the maintainers or community of your distro have uploaded to the repos. Well, if you want to have the latest version released by Oracle of Java, we show you a simple tutorial to install it step by step on your system, without complications.

The first thing you should do is download the latest version of Java package from this link that I leave you. When you have the OpenJDK package that will be a tar.gz taarball, you will have to unpack the package in order to continue with the next steps. By the way, if you want, you can verify the download using the sum sha256 to see that it is intact and not corrupt or has been modified ...

Well, although tarballs are not convenient to unpack using the graphical tools because you can modify some permissions of the files it contains, in this case it does not matter, so you can do it from the console using commands or with your own file manager from one easy way extracting the content. Ok, once done, we already have a directory with the files ready. The directory that has been generated will be called jdk-version, and then we proceed by entering ~ / .profile and edit to add these lines at the end:

export JAVA_HOME="~/jdk-10.0.1"

export JDK_HOME="~/jdk-10.0.1"

export PATH="$JAVA_HOME/bin:$PATH"

So we have the environment variables ready, you know that if your version it is different from 10.0.1 you must modify according to your case ... and the jdk-version directory must be where the directory you have unpacked is ...

If instead of doing it for a single user you want to do it for the whole system, that is, for all users, then you must do the same but in /etc/profile.d/ where we will create a file called with the same content using sudo ...

If everything went well, can you check version with:

java -version

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published.



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.