sdkman / sdkman-disco-integration

10 stars 11 forks source link

Wrong java sdk for current architecture gets installed #11

Closed Fachher closed 1 year ago

Fachher commented 1 year ago

I have an Apple M1 Macbook Pro.

My terminal is executed without rosetta.

I have disabled rosetta compatible sdk's $> sdk config | grep rosetta sdkman_rosetta2_compatible=false

I have installed amazon two different versions

sdk install java 17.0.5-amzn $> jshell jshell> System.getProperty("os.arch") $1 ==> "aarch64"

sdk install java 20.0.1-amzn $> jshell jshell> System.getProperty("os.arch") $1 ==> "x86_64"

I expect that the architecture is aarch64 instead of x86_64.

I have doubled check my configuration and deinstalled sdkman. This problem is reproducible

marc0der commented 1 year ago

Moving this here as this sounds like it could be a data issue.

eddumelendez commented 1 year ago

can not reproduce

▶ cd ~/.sdkman/candidates/java/17.0.5-amzn/bin

java/17.0.5-amzn/bin
▶ file java
java: Mach-O 64-bit executable arm64
▶ cd ~/.sdkman/candidates/java/20.0.1-amzn/bin

java/20.0.1-amzn/bin
▶ file java
java: Mach-O 64-bit executable arm64
Fachher commented 1 year ago

I have two M1 devices. I can reproduce it on both machines. How can I provide more informations?

eddumelendez commented 1 year ago

I misunderstood but still can not reproduce

▶ sdk use java 17.0.5-amzn

Using java version 17.0.5-amzn in this shell.

git  main ✗                                                                                3h22m ◒
▶ jshell
|  Welcome to JShell -- Version 17.0.5
|  For an introduction type: /help intro

jshell> System.getProperty("os.arch")
$1 ==> "aarch64"
▶ sdk use java 20.0.1-amzn

Using java version 20.0.1-amzn in this shell.

git  main ✗                                                                                3h24m ◒
▶ jshell
|  Welcome to JShell -- Version 20.0.1
|  For an introduction type: /help intro

jshell> System.getProperty("os.arch")
$1 ==> "aarch64"
marc0der commented 1 year ago

Would you mind turning on the debug config and pasting the dump here when you perform an installation? Also please paste the output of uname -a.

Fachher commented 1 year ago

Today I am unable to reproduce this behavior. This is the output of uname -a. Darwin DEASJC24Q1X627 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64

Please close this issue