Live data from Hacker News

Installing Java in 2025, and Version Managers

blog.hakanserce.com

1–10 of 65 posts

Re: Installing Java in 2025, and Version Managers

#4
With Mill build tool that I'm working on, you don't need to install Java at all! (https://mill-build.org/blog/16-zero-setup.html). Instead, it gets bootstrapped automatically when you launch the `./mill` script like any other third-party dependency. You can use any version you want just by editing the config file and it'll be downloaded and cached on demand. You can also configure different JVM versions to use in different Java modules without worrying about conflicts between them.

You don't need to globally install Apache-Commons, nor is there a "Apache Commons Version Manager" that you need to first install to then manage your different versions of Apache Commons. So why should the JVM need such a thing? Well with Mill, it doesn't

Re: Installing Java in 2025, and Version Managers

#8
post #7
post #5

Happy sdkman user for many years.

Never understood why you’d use sdkman for Java. I just do: 1. brew install openjdk@ 2. ln -s 3. /libexec/java_home -v Afaik, with some aliases in you *shrc it basically reimplements sdkman, what else does it give you?

This works if all you need is OpenJDK. Per the article, sdkman allows one to install and switch between different versions and brands of JDKs.

Re: Installing Java in 2025, and Version Managers

#9
Before even deciding which Java to install, you have to decide which _version managers_ to use:

1. No version manager, download and install manually. Not that hard, since it's just a zip file and maybe set JAVA_HOME envvar. If you need multiple versions to co-exist, skip this.

2. Use OS' "native" package manager. Brew, apt, chocolatey.

3. Generic package manager like asdf.

4. SDKMAN!, JBang, jEnv, jabba...

Deciding is easy. But remembering which one you used 6 months ago when you want to install another version...

Re: Installing Java in 2025, and Version Managers

#10

Before even deciding which Java to install, you have to decide which _version managers_ to use: 1. No version manager, download and install manually. Not that hard, since it's just a zip file and maybe set JAVA_HOME envvar. If you need multiple versions to co-exist, skip this. 2. Use OS' "native" package manager. Brew, apt, chocolatey. 3. Generic package manager like asdf. 4. SDKMAN!, JBang, jEnv, jabba... Deciding i…

[deleted]
Post reply on HN