halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
440 stars 84 forks source link

Cannot install x64 Java on Mac M1 #180

Closed akkadaya-snsw closed 2 years ago

akkadaya-snsw commented 2 years ago

After upgrading asdf to 0.10.0 these instructions don't work anymore: https://github.com/halcyon/asdf-java#apple-silicon-integration

it shows the arm64 versions only.

seanzxx commented 2 years ago

You can install x86 with arch command. Try this command: arch -x86_64 asdf install java openjdk-11.0.2

akkadaya-snsw commented 2 years ago

That's exactly the issue, it doesn't find or install the version I want. Install using arch -x86_64 asdf install java temurin-11.0.15+10 returns this:

Unknown release: temurin-11.0.15+10

listing all using arch -x86_64 asdf list-all java this:

sapmachine-jre-18-internal.0
sapmachine-jre-18.0.1
temurin-17.0.0+35
temurin-17.0.1+12
temurin-17.0.2+8
temurin-18.0.0+36
temurin-jre-17.0.1+12
temurin-jre-17.0.2+8
zulu-8.52.0.23
zulu-8.54.0.21

Same applies when running:

arch -x86_64 /bin/zsh

Or opening terminal with "Open using Rosetta"

seanzxx commented 2 years ago

@akkadaya-snsw I'm getting different result. When I get the jvm list without arch: asdf list-all java | grep 'temurin'

temurin-17.0.1+12
temurin-17.0.2+8
temurin-18.0.0+36
temurin-jre-17.0.1+12
temurin-jre-17.0.2+8

When I list jvm with arch: arch -x86_64 asdf list-all java | grep 'temurin'

temurin-8.0.302+8
temurin-8.0.312+7
temurin-8.0.322+6
temurin-8.0.332+9
temurin-11.0.12+7
temurin-11.0.13+8
temurin-11.0.14+9
temurin-11.0.14+101
temurin-11.0.15+10
temurin-16.0.2+7
temurin-17.0.0+35
temurin-17.0.1+12
temurin-17.0.2+8
temurin-17.0.3+7
temurin-18.0.0+36
temurin-18.0.1+10
temurin-jre-8.0.302+8
temurin-jre-8.0.312+7
temurin-jre-8.0.322+6
temurin-jre-8.0.332+9
temurin-jre-11.0.12+7
temurin-jre-11.0.13+8
temurin-jre-11.0.14+9
temurin-jre-11.0.14+101
temurin-jre-11.0.15+10
temurin-jre-17.0.1+12
temurin-jre-17.0.2+8
temurin-jre-17.0.3+7
temurin-jre-18.0.1+10
akkadaya-snsw commented 2 years ago

Hi @seanzxx, it happened to me yesterday as well. Suddenly it started showing all the x86_64 versions when using Rosetta.

I will close this issue.