3

enter image description hereim trying to install JDK 17.0.1 and I don't have any java installed in my computer like other versions of JDK and java runtime. Im using macOS Monterey. my CPU is I5 and I have a Mac book 2020 and 13 inches. more info: MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports) processer: 2 GHz Quad-Core Intel Core i5 memory: 16 GB 3733 MHz LPDDR4X Graphics: Intel Iris Plus Graphics 1536 MB

3 Answers3

14

In my case, I downloaded the Arm 64 DMG Installer, the architecture of which does not work on my mac. Downloading the x64 DMG Installer (the final option) was the right choice.

IcedDante
  • 6,145
  • 12
  • 57
  • 100
5

tl;dr

Use an installer for Intel Macs rather than Apple Silicon Macs.

Obtain installer for Macs with Intel chips

Certainly Java 17 will run on your computer.

I am not sure, but I would make this guess as to the root of your problem… I suspect you downloaded an installer for the Apple Silicon Macs, rather than for Macs with Intel chips.

Go to any of the several vendors providing JDK products. Some are free-of-cost, some require a fee. Be sure to understand their terms before downloading.

Those vendors include, off the top of my head: Azul Systems, Adoptium (formerly AdoptOpenJDK), BellSoft, Amazon, Red Hat/IBM, Microsoft, Oracle, SAP, Pivotal, and likely more.

On their respective download page, be sure to opt for the edition labeled "Intel", "x86", "AMD-64", or some such to indicate Macs with Intel chips.

Do not download any edition labeled "Apple Silicon", "ARM", or "AArch-64", as these indicate the Macs with M1 chips.

Here is an example screenshot from Adoptium web site for their Temurin product, an installer of a JDK implementing Java 17 based on the source code at the OpenJDK project.

Screenshot of Adoptium download page

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
1

Using package managers simplifies your experience as you can get anything from one place. Moreover, vendors support packages at such systems. I prefer SDKMAN!

Try to use SDKMAN https://sdkman.io. For example, you can install Liberica JDK 17 on MacBook Pro with X86 or M1 processors, and you do not have to care SDKMAN will select the right package for you.

Download and install SDKMAN!:

$ curl -s "https://get.sdkman.io" | bash
$ source "$HOME/.sdkman/bin/sdkman-init.sh"

Get the list of available Java distributions to install:

$ sdk list java

For example, to install Liberica JDK 17:

$ sdk install java 17.0.1-librca

or with Java FX

$ sdk install java 17.0.1.fx-librca 

Check a short document about other package managers and how to use them for Liberica JDK installation. https://bell-sw.com/pages/package-managers/#sdkman