{% set title="Java 17 Installation Guide for Mac Users" %} title: "{{ title }}" pageNav: 2
This guide explains how to install the ==Java 17 JDK+FX Azul distribution== on macOS using SDKMAN.
Why this specific version of JDK?
- This version comes with JavaFX (which is not included in most JDK distros).
- This version is resilient to compatibility issues between Mac ARM and Mac Intel computers when creating/running Java GUI applications built using JavaFX.
Why SDKMAN? SDKMAN simplifies the process of installing, switching between, and managing multiple versions of SDKs on Unix-based systems.
- Install SDKMAN if you don't have it already.{{ step_numbers }}
- Open Terminal and run the following command.{{ abcd_numbers }}
curl -s "https://get.sdkman.io" | bash
- Follow the instructions on the screen to complete the installation.
- Restart your terminal or run:
source "$HOME/.sdkman/bin/sdkman-init.sh"
- To verify the installation, run:
sdk version
- Open Terminal and run the following command.{{ abcd_numbers }}
- Install JDK using SDKMAN
- Install the Java 17 JDK FX version (codename Zulu) by running:{{ abcd_numbers }}
sdk install java 17.0.11.fx-zulu
- This version should be automatically set as the default, but if it is not, set it as the default by running:
sdk default java 17.0.11.fx-zulu
- Install the Java 17 JDK FX version (codename Zulu) by running:{{ abcd_numbers }}
- Verify installation by running the following command. You should see the version information for Java 17.0.11.fx-zulu.
java -version
If you have multiple versions of Java installed, you can switch between them using SDKMAN.
- To see the currently active Java version run,
sdk current java
- To switch to a different installed version, run the following command first.
Then press the Tab key to see the available versions installed on your computer. Keep pressing the same key until you select the desired version, and hit Enter.
sdk use java
- If you don't have the desired version installed, you can install it by running the following command (as before):
sdk install java <version>
- To set a different version as the default, use the following command (as before):
sdk default java <version>
Authors:
- Initial Version: Jay Hong (@hjungwoo01)