How do you handle Java JRE updates in Ubuntu? It seems like there’s always an update for Java every two weeks. For Windows and Mac OS X users, it easy to update JAVA. All they have to do is visit Java download page and install the latest updates.

If you’re using a Linux machine, Ubuntu included, then you know it’s not that easy. Just before Oracle withdrew the license that enabled Linux systems, including Ubuntu to package and distribute Java Runtime Environment, users could easily update Java when there was an update by running apt-get update command.

Not anymore. Now if you wish to install Java JRE in Ubuntu or most Linux machines, you must manually download and install it which isn’t was easy as it is in Windows.

Well, this brief post is going to make that easy for you if you’re an Ubuntu user. What I’m going to show you is how to enable a repository in Ubuntu and update JAVA whenever there’s an update.

To get started, press Ctrl – Alt – T on your keyboard to open the terminal. When it opens, run the commands below to add the below repository,.

sudo sh -c 'echo "deb http://www.duinsoft.nl/pkg debs all" >> /etc/apt/sources.list'

 

Next, run the commands below to install the repository key. This key enables the repository and make sure that packages are authenticated and trusted.

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

 

Finally, run the commands below to install Java Runtime Environment.

sudo apt-get update && sudo apt-get install update-sun-jre

 

That’s it.

 

java-jre-ubuntu

 

Java is install along with all its browser plugins for each browser. As long as the repository is enabled all new JAVA updates will be installed when you update your machine.

To uninstall Java from your machine, run the commands below.

sudo apt-get purge update-sun-jre && sudo apt-get autoremove

 

Enjoy!