Skip to main content
How to update Java

Maintenance

How to update Java

Keep Java up to date with this short guide — better security and stability.

Back to Tech Corner
MI Support IT3 min read

How to update Java on Windows and Linux (2025)

Java is a popular programming language used in many different applications and systems worldwide. To ensure optimal performance, security and compatibility it's essential to keep your Java installation up to date. In this article we walk through why it matters and how to easily update Java on both Windows and Linux.

Why is it important to keep Java updated?

Security

Java updates often contain important security fixes that protect your computer against hackers and malware. Keeping Java updated minimises the risk of security gaps that could compromise your system.

Performance

The newest Java versions contain improvements that can increase the speed and stability of your applications. That helps improve the user experience and the efficiency of the programs you use.

Compatibility

Updates ensure compatibility with the latest technologies and standards. That means avoiding problems when using newer software or upgrading existing applications.

How to update Java on Windows

  1. Open your web browser and go to Java's official website.
  2. Click the "Get Java now" button to download the installation file.
  3. Once the file is downloaded, double-click it and follow the on-screen instructions to complete the installation.
  4. After installation is complete, it's recommended to restart your computer so the new Java version activates correctly.
  5. Verify the installation by visiting https://www.java.com/verify. If the installation succeeded, you'll get a confirmation message.

How to update Java on Linux

  1. Open a terminal by pressing Ctrl + Alt + T or searching for "terminal" in the menu.
  2. Update the package list by entering: sudo apt-get update
  3. Install the latest OpenJDK version with: sudo apt-get install openjdk-17-jdk. Replace the number (e.g. 17) with the latest version. Check the latest version on the OpenJDK website.
  4. Edit the JAVA_HOME environment variable by opening the .bashrc file: nano ~/.bashrc
  5. Add the following line at the bottom of the file: export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64. Replace the version number with the installed Java version.
  6. Save the file (Ctrl + O) and close the text editor (Ctrl + X).
  7. Apply the changes by reloading the file: source ~/.bashrc
  8. Verify the Java version with: java -version

MI Support Service Desk

Our service desk helps ensure your systems and clients always have the latest Java version installed. Contact us for professional assistance.

FAQ — frequently asked questions

How often should I update Java?

It's recommended to check for updates at least once a month, as security fixes and updates are released regularly.

How do I know which Java version I have?

You can check your Java version by opening the terminal and entering java -version. On Windows you can also find the Java version in the control panel under Java.

Is Java free?

OpenJDK, the most common Java distribution, is free and open source. Oracle also offers Java SE with certain licence restrictions.

What do I do if I encounter problems after updating Java?

If you encounter problems after an update, it may be due to incompatibility with existing software. Contact the software vendor's support or try reinstalling the Java version.

Can I have multiple Java versions installed?

Yes — it's possible to have multiple Java versions installed on the same computer. Make sure to manage the JAVA_HOME environment variable correctly so you use the desired version.

Need help right now?

Our service desk is ready to help if the guide doesn't go far enough.