Java and multiple java on MacOS

Talk about the Ultimate Question of Life, The Universe, and Everything
Post Reply
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Java and multiple java on MacOS

Post by devster »

I'm looking for a bit of advice.
I'm migrating from an old machine to a new one and I had a huge mess with Java versions in the old one.
Some were installed using Homebrew, some using the .pkg files from Oracle, some using OpenJDK.
What would be the optimal and cleanest way to install Java (like Java SE 13, or the JDK), and maybe an older version for compatibility (say Java 8) on MacOS?
Thanks.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Java and multiple java on MacOS

Post by rednoah »

Well, I suppose brew cask install java will do the trick, and install the latest OpenJDK, and also take care of removing old versions when upgrading to newer versions. If you grab the Oracle JDK 8 (AFAIK, no longer publicly available) then you can install that particular version via the *.pkg installer, but over time you will end up with multiple JDKs if you keep doing this for every release.
:idea: Please read the FAQ and How to Request Help.
Post Reply