shyiko / jabba

(cross-platform) Java Version Manager
2.97k stars 194 forks source link

Cant install macosx/aarch64 based jdks - Apple M1 supported? #827

Open otbe opened 2 years ago

otbe commented 2 years ago

Hi there.

I recently switched from an intel based Macbook Pro to an M1 based. Jabba in general works but Im not able to install any aarch64 jdks. It always tries to download the x64 variant.

For example

jabba install zulu@1.8
Downloading zulu@1.8.282 (https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-macosx_x64.tar.gz)

As far as I can tell the index includes a aarch64 version of this jdk.

What am I doing wrong here?

Thank you very much!

liebig commented 2 years ago

As a workaround, I would use the jabba install command with the path specified: jabba install 1.8.0-zulu=tgz+http://PATHTOZULU.com/distribution.tar.gz

mkurz commented 2 years ago

There is another jabba index which you can use to get the adoptium builds for aarch64 and others: https://github.com/typelevel/jdk-index You just need to change an environment variable.

RickMoynihan commented 2 years ago

Just a note that I had this issue too; it looks like the architecture isn't properly detected on an m1 mac. The posted workaround does work though.

mkurz commented 2 years ago

One more index you can use: https://github.com/coursier/jvm-index/blob/master/index.json (make sure you use the raw file)

jborgers commented 1 year ago

I downloaded Adoptium Temurin-11.0.17+8 from the index, however, jabba use doesn't work. With java -version, I still see my system installed Zulu17.

martonsz commented 1 year ago

This repo is not maintained anymore. There is an issue that mentions a fork of this project: https://github.com/shyiko/jabba/issues/845

My issue at the fork has been resolved about this problem: https://github.com/Jabba-Team/jabba/issues/14 You can download an ARM version here: https://github.com/Jabba-Team/jabba/releases/tag/0.12.1-rc

jborgers commented 1 year ago

Thanks @martonsz! That really helped.