Installing Java in 2025, and Version Managers

Installing Java in 2025

Remember when installing Java meant one download, one version, once choice? Back in the old days, you would head over to java.sun.com or later to Oracle website to download the installer, click through a few prompts, and you were done. Life was simple.

Back then, there was typically one widely-adopted version of Java that would remain stable for years. You didn’t need to think much about version management because there wasn’t much to manage. Over the years, a lot has changed.

The Modern Reality

Fast forward to today, and the Java installation landscape looks drastically different. Sure, Oracle/Java website is still an option, but now you need to navigate licensing considerations. Oracle’s JDK FAQ now includes a long section on licensing, long enough to give you a headache if you are not familiar with the licensing terminology.

To complicate things further, Oracle isn’t your only option anymore. Multiple vendors now offer their own Java distributions: Amazon (Corretto), Red Hat (OpenJDK), Eclipse (Temurin), IBM, Microsoft, and many more. Each has its own strengths, support models, and target audiences.

JDK Vendors as of this writing (courtesy of sdkman.io) JDK Vendors as of this writing (courtesy of sdkman.io)

On top of the vendor proliferation, we now have a dizzying array of versions to choose from. Java 8, 11, 17, and 21 are all Long-Term Support (LTS) releases available as of this writing, and there are also numerous non-LTS versions between them. This makes it harder to choose which version to install.

On top of that, different projects require different versions, so we need to not just decide on a version, but also learn living together with multiple versions and switching between them swiftly as needed.

So, how do we navigate this complexity?

What Are Our Options?

When faced with this complexity, developers typically choose one of two paths:

  • Manual Installation: Download installers from vendor websites, run them, and manually manage your PATH variables and JAVA_HOME settings. This works but becomes tedious when you need multiple versions.
  • Version Managers: Tools like SDKMAN! that automate the installation and switching between different Java versions and vendors. This is where the modern approach shines.

And Java isn’t unique here. This pattern has emerged across the entire development ecosystem. Python, Node.js, Ruby, Groovy, Scala, virtually every programming language now has multiple versions in active use, and developers need efficient ways to manage them.

Enter Version Managers

Version managers are specialized tools designed to solve this exact problem. They provide a unified interface for installing, updating, and switching between different versions of a programming language or runtime environment.

Think of them as package managers specifically optimized for managing multiple versions of the same tool. Rather than cluttering your system with manual installations, version managers keep everything organized in a dedicated directory structure and handle PATH manipulation automatically.

How They Work

While implementation details vary, most version managers follow a similar pattern. I’ll use SDKMAN! as an example below.

  1. Install Version Manager: You install the version manager itself (usually via a simple script or system package manager)

    curl -s "https://get.sdkman.io" | bash
    
  2. Discover: The version manager maintains a catalog of available versions from various sources

    # list available versions 
    sdk list java
    
  3. Install Versions: You use simple commands to install specific versions

    # install the latest stable version of Eclipse (Temurin) JDK
    sdk install java
    
    # you can also specify version
    sdk install java 21.0.4-tem
    
    # list installed versions (works in typical scenarios)
    sdk list java | grep installed
    
  4. Select a Version: You can switch between versions globally or per-project with straightforward commands

    # select a different version
    sdk use java 21.0.4-tem
    
    # or put a .sdkmanrc file under the project folder to specify project specific version
    

The version manager intercepts calls to the language runtime and routes them to the appropriate version. Most version managers also support configuration files that specify which version to use for a particular project, ensuring consistency across your team.

The Benefits

Why have version managers become so popular? The advantages are compelling:

  • Simplicity: One-line commands replace multi-step installation wizards and manual configuration
  • Reproducibility: Teams can ensure everyone uses the same language version by committing version files to source control
  • Isolation: Different projects can use different versions without conflicts
  • Easy Upgrades: Testing new versions is as simple as installing them and switching—no need to uninstall or worry about breaking existing projects
  • Cleanup: Removing versions you no longer need is straightforward and complete
  • Discovery: Most version managers make it easy to see what versions are available and what you have installed

Different ecosystems have embraced different tools, but the concept remains consistent across them all:

Language / Ecosystem Version manager
Python pyenv
Node.js nvm
Java, Kotlin, Scala, Groovy, … SDKMAN!
Ruby rbenv

If you are frequently working with multiple languages, there are even version managers that promise handling all languages/SDKs like asdf-vm and vfox.

Check awesome-version-managers for many more version managers if you are into it.

Making the Switch

If you’re still manually installing and managing language versions, now is a great time to explore version managers. The initial setup takes minutes, and the time savings accumulate with every project.

Start with the version manager most popular in your primary language’s ecosystem. Once you get the hang of it, you will start using it for all the languages you are working with.

The days of wrestling with PATH variables, hunting for old installers, and worrying about breaking existing projects when upgrading are behind us. Version managers have become essential infrastructure in the modern development workflow—tools so useful that once you adopt them, you’ll wonder how you ever worked without them.

Conclusion

The proliferation of language versions and distributions has fundamentally changed how we set up development environments. What seemed like a complication —multiple vendors, frequent releases, compatibility concerns— has actually driven the creation of better tooling.

Version managers acknowledge that modern software development requires flexibility, that different projects have different needs, and that switching between contexts should be effortless rather than error-prone.

So next time you need to install Java, Python, Node, or any other language runtime, skip the vendor website. Reach for a version manager instead. Your future self —juggling multiple projects with different requirements— will thank you.


See also