Download and Install Oracle JDK 19 on macOS
- Details
- Written by Nam Ha Minh
- Last Updated on 06 December 2022   |   Print Email
1. Download DMG Installer for Oracle JDK 19
Oracle JDK is distributed in both compressed archive and installer. I recommend you to download DMG installer for macOS for the ease of setup.Head over to the official Oracle JDK download page, you should see the following page:You can see, there are 2 links for DMG installer (x64 and Arm64). Which one to choose depends on your Mac’s CPU architecture.- If your Mac has Intel CPU, download the x64 DMG Installer
- Else if your Mac has Apple chip, download the Arm 64 DMG Installer (link number 1)
shasum -a 256 jdk-19_macos-aarch64_bin.dmg
2. Install Oracle JDK 19 on macOS
To install Oracle JDK 19, double click the .dmg file. It will extract to JDK 19.0.1.pkg package. Then double click the package icon to launch the installer. You should see the JDK installer program appears:Just click Continue to start installation process. It will be quick and easy. And when it’s done, click Close to quit the installer. And click Move to Trash when you’re asked to move the installer to trash.By default, Oracle JDK 19 will be installed in /Library/Java/JavaVirtualMachines/jdk-19.0.1.jdk directory.Note that using DMG installer, it puts java and javac programs under /usr/bin directory which is included in the PATH environment variable. So you don’t have to configure system environment variable, just type java -version and javac -version in the terminal to check:If you see this output, that means Oracle JDK 19 has been installed successfully on your macOS. I recommend you to watch the following video to see the setup in action: Related Articles:
- How to set JAVA_HOME in macOS and Linux permanently
- How to set JAVA_HOME environment variable on Windows 10
- What are JVM, JRE and JDK
- How to write, compile and run a hello world Java program for beginners
- Java Core Language Tutorials
Comments