Closed bfrengley closed 2 years ago
This also affects macOS.
$ asdf install java temurin-11.0.13+8
########################### 100.0%
########################### 100.0%
OpenJDK11U-static-libs_x64_mac_hotspot_11.0.13_8.tar.gz
OpenJDK11U-static-libs_x64_mac_hotspot_11.0.13_8.tar.gz: OK
Integrating with /usr/libexec/java_home needs root permission for it to create folders under /Library/Java/JavaVirtualMachines
cp: /private/var/folders/f0/2hl24lbx1nzdqzbp7yl6trp00000gp/T/asdf-java.dxeLX7Rc/jdk-11.0.13+8-static-libs/Contents/MacOS: No such file or directory
cp: /private/var/folders/f0/2hl24lbx1nzdqzbp7yl6trp00000gp/T/asdf-java.dxeLX7Rc/jdk-11.0.13+8-static-libs/Contents/Info.plist: No such file or directory
Fix for this looks to be at #166
There was an issue in the upstream project providing the release metadata (https://github.com/joschi/java-metadata/issues/23).
The issue should be fixed since https://github.com/halcyon/asdf-java/commit/7e886b44a83c39d970b3243a1bb64cf49d335a97.
👍 After updating the plugin, I was able to install the correct temurin-11 and temurin-17.
Description
Adoptium (formerly AdoptOpenJDK) JDKs are generally supported by asdf-java (see #158). However, with the most recent LTS releases of the JDK, Adoptium/AdoptOpenJDK also releases static libs (see their release page for JDK 11.0.13+8 as an example).
These static lib releases are picked up by asdf-java (see https://github.com/halcyon/asdf-java/blob/797b8c199cd4eb1729e802fd0e4e7ffd5ec43884/data/jdk-linux-x86_64.tsv#L41 for example) and are selected due to being last in the release list (due to
tail -n 1
in https://github.com/halcyon/asdf-java/blob/797b8c199cd4eb1729e802fd0e4e7ffd5ec43884/bin/functions#L74). asdf-java only selects a single archive to download/install for an installation, so it only selects the static libs archive which does not include binaries and therefore installing the affected versions does not install a usable JDK orjavac
.This issue affects four different Adoptium/AdoptOpenJDK releases, all of which are LTS releases:
Other Adoptium/AdoptOpenJDK releases work correctly (including previous releases of JDK 11 and 17) because Adoptium did not publish static libs for those releases.
Environment
OS: Debian GNU/Linux bookworm/sid on Windows 10 x86_64 (WSL2) CPU: Intel i7-11700
Replication steps
asdf install java temurin-11.0.13+8
asdf shell java temurin-11.0.13+8
asdf which javac
Expected outcome
Temurin JDK 11.0.13+8 is installed and
asdf which javac
succeeds.Actual outcome
asdf-java installs the Temurin JDK 11.0.13+8 static libs only which does not include binaries, so asdf cannot find
javac
: