How To Install, Update And Uninstall Java on Windows, MacOS and Ubuntu

In the scope of this article, I’ll explain to you how to install Java, how to update Java version and how to uninstall Java completely for 3 the most popular operating systems: Windows 10, MacOS, and Ubuntu.

Installation consist of steps:

  • Download JDK (32 or 64 bit) for your OS (Windows, MasOS, Ubuntu)
  • Visual steps how to install Java and enable it on your computer

Updating contains answers to the questions:

  • How do I check for a Java update?
  • Is it OK to update Java?
  • How do I update Java (Windows, MasOS, Ubuntu) to the latest available version?

Removing will give you an answer to:

  • Can I remove old versions of Java?
  • How do I remove Java from the registry on Windows 10?
  • How to uninstall Java completely?

Use a table of contents below for fast navigation.

How To Install Java

Installing Java is different on Windows, MacOS, and Ubuntu, so find a part related to your operating system and follow steps described there.

By the way, since Java 9 Oracle doesn’t provide 32-bit Java versions, so you can download Java 8 or install 64-bit Java 9.


Go to the official Oracle download page and click on the major version of Java (currently the newest version is Java SE 9.0.4)

.download java

Accept a license agreement and click on jdk-9.0.4_windows-x64_bin.exe to download it:

accept agreement and select java OS

Launch installer when it is downloaded.

java installer introduction on Windows 10

Press “Next”:

Java installer custom setup on Windows 10

Press “Next” again and wait until installation will complete:

Java installing in progress on Windows 10

Java installer offers you to install JDK:

Java installer choose folder on Windows 10

Press “Next” and installation will be started:

installing Java on Windows 10

And finally, Java successfully installed:

Java installation is completed on Windows 10

You can check Java version via Command Prompt in Start menu or you can run it via right-click on Start menu – Run – cmd.

Type  java -version.



Go to the official Oracle download page and click on the major version of Java (currently the newest version is Java SE 9.0.4)

.download java

Accept a license agreement and click on jdk-9.0.4_osx-x64_bin.dmg.

accept agreement and select java OS

When downloading is finished launch dmg file and double-click on the icon.

double click to install Java on MacOS

Java installer introduction window will be opened.

Java installer introduction on MacOS

Press “Continue”.

Java installation type on MacOS

Press “Install”.

Java install succeeded on MacOS

So Java is successfully installed and ready to use.

To check Java version you need:

  1. Open Launchpad
  2. Find and open Terminal
  3. Type  java -version



There are 2 options to install – Open JDK and Oracle JDK.

The difference is described here.

Personally, I prefer Oracle JDK.

Oracle JDK

To install Java on Ubuntu you need open Terminal (Alt + Ctrl + T) and type:

This will add a PPA repository that contains Java installer.

Then if you want to install Java 8 execute a command:

If you want to install Java 9 execute:

So Java is installed.

You can check Java version by typing:



It’s not necessary to add any additional PPA repositories.

Just update a package index:

and install a default-jdk package:

Check Java version by typing:

How To Update Java

The updating process is different on Windows, MacOS, and Ubuntu, so find a section related to your operating system and follow steps.


Open Start menu and search for “Java”:

start menu check for updates of Java on Windows 10

Launch Check For Updates – this will open Java Control Panel on Update tab:

Java control panel update tab on Windows 10

Press Check Now and If updates are available installation will start:

Java update is available on Windows 10

Press “Update” to update Java:

Java is downloading update on Windows 10

So Java update is successfully installed.

Java updated successfully on Windows 10


Go to System Preferences and click on Java icon on the bottom.

System references Java MacOS

Java Control Panel will be opened, go to Update tab and press Update Now.

Java update now button on MacOS

Java Installer will be opened, press Install Update button.

Install Java update on MacOS

Wait a little bit while a new version is downloading…

Downloading Java update on MacOS

And the latest version of Java is successfully installed.

Java successfully updated on MacOS


It’s not necessary to do something special to update Java on Ubuntu.

While you’re using PPA as I described in installation chapter you can execute update and upgrade commands in the console and that’s it.

Open Terminal (Alt+Ctrl+T) and execute:

If a new version of Java is available it will be automatically installed.

How To Uninstall Java

The removing Java is different in Windows, MacOS, and Ubuntu, so find a guide related to your operating system below.


Open Start – Settings and search for “Apps & features“:

search for apps & features in settings on Windows 10

Search for “Java” in “Apps & features” and press “Uninstall” on Java (64-bit):

uninstall Java on Windows 10

Do the same is for Java(TM) SE Development Kit:

uninstall JDK on Windows 10

Removing Java is in progress:

uninstalling Java in progress on Windows 10

And Java successfully removed from your PC.

If you want to remove Java from registry Oracle recommends to use Microsoft utility.


As a first requirement for uninstalling Java on MacOS – you should have administrator privileges.

As a second requirement – you shouldn’t afraid to use terminal.


  1. Click on Launchpad in dock
  2. Search for Terminal and open it.
  3. Copy and Paste commands to uninstall Java completely:

If you want to remove a concrete version of Java, e.g. Java 9.0.1 you need:

  1. Check what Java versions are available:  ls /Library/Java/JavaVirtualMachines/
  2. Remove the folder with that version, e.g.  sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk


There are 2 options depending on the type of JDK (OpenJDK or Oracle JDK) how to remove Java in Ubuntu.


Check installed Oracle JDK packages:

Remove Java 8:

Removing Java 9:


First of all, take a look at installed OpenJDK packages:

Depending on installed packages you should edit a list to remove:

Check again for installed packages, the list should be empty:

1 Star2 Stars3 Stars4 Stars5 Stars
Scroll Up