


Great, we are well equipped with the right tools, now we can install our JDKs. Guess how we can install jEnv? Yes, with our great free package manager - Homebrew.

Imagined? Great, for that we have a great tool called jEnv!(applause).Īccording to jEnv’s web site ( ): “jEnv is a command line tool to help you forget how to set the JAVA_HOME environment variable”. Of course you can do it manually, you have to open the browser, find the website, find the right link, wait the download to complete, set up your environment… but why would we want all of that, right? Let’s make our life easier, we can use another tool just for that, imagine switching versions with only one command. The idea is to install multiple Java versions and we want to be able to switch from one to another easily. So, what’s next? More tools - Got a utility belt? Yey! For more details check Homebrew’s web page.

Now you have your free MacOs package manager installed. This command will automatically update Homebrew before installing Cask. It only takes 1 line in your shell to reach 4085 Casks maintained by 414 contributors.” - Great! Why not!? So, at your prompt: According to their website: “Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike. We are going to use an extension ( cask) of Homebrew that makes even easier to install applications in your Mac. So, it’s easy to install, just paste the following at a Terminal prompt: First Step - Let’s Brew it!įor those that doesn’t know Homebrew, according to their webpage, “Homebrew is the missing package manager for macOS” and “Homebrew installs the stuff you need that Apple didn’t.” - Bold. Let’s see how we can make this process easier. You might feel the need to test the new features, migrate old projects but you might find cumbersome to set the Java environment every time you want to try a different JDK. In recent years Java has changed a lot of its features and has not just deprecated packages but even removed them from JDK. The latest JDK release at the time of writing this article is JDK 11.0.1. Oracle JDK LTS (Long Term Support), released every 3 years, which requires a commercial license or OpenJDK which is free but for bug fixes and security patches we should every 6 months upgrade it. Working with multiple Java versions in MacOSĪs you might know Oracle has decided to make some money out of the JDK.
