SDKMAN allows setting a global default version, and a version specific to the current shell. SDKMAN also places the installed JDK's into its own directory tree, which is typically ~/.sdkman/candidates/java. SDKMAN is a bit different and handles both the install and the switching. Installing and Switching versions with SDKMAN (preferred) Otherwise, there are easier options such as SDKMAN that also will install other important and common tools for the JVM. The advantage of a manual install is that the location of the JDK can be placed in a standardized location for Mac OSX. Installationįirst, install Java using whatever method you prefer including SDKMAN, Homebrew, or a manual install of the tar.gz file. Switching can be done by JEnv, SDKMAN, Jabba, or manually by setting JAVA_HOME.
Installation can be done by Homebrew, SDKMAN, Jabba, or a manual install. You have a few options for how to do the installation as well as manage JDK switching. Easily work with Java 7, Java 8, Java 9, Java 10, Java 11, Java 12, Java 13, Java 14, Java 15, Java 16, and Java 17! This includes alternative JDK's from OpenJDK, Oracle, IBM, Azul, Amazon Correto, Graal and more. Note: These solutions work for various versions of Java including Java 8 through Java 17 (the LTS version).