Skip to content

Latest Adoptium/AdoptOpenJDK LTS versions do not install binaries #167

@bfrengley

Description

@bfrengley

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

adoptopenjdk-11.0.13+8 OpenJDK11U-static-libs-musl_x64_alpine-linux_hotspot_11.0.13_8.tar.gz https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-static-libs-musl_x64_alpine-linux_hotspot_11.0.13_8.tar.gz 95435c5cd94959661f3c40ecba499611d95c7764a91919725564a3aa587df4db
for example) and are selected due to being last in the release list (due to tail -n 1 in
release_data=$(grep "^${ASDF_INSTALL_VERSION} " "${CACHE_DIR}/releases-${OS}-${ARCHITECTURE}.tsv" | tail -n 1)
). 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 or javac.

This issue affects four different Adoptium/AdoptOpenJDK releases, all of which are LTS releases:

tmp.pLplZRHBjQ ❯❯❯ rg 'static-libs' /tmp/asdf-java.cache/releases-linux-x86_64.tsv | awk '{print $1}'
adoptopenjdk-11.0.13+8
adoptopenjdk-11.0.13+8
adoptopenjdk-17.0.1+12
adoptopenjdk-17.0.1+12
temurin-11.0.13+8
temurin-11.0.13+8
temurin-17.0.1+12
temurin-17.0.1+12

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

  1. Run asdf install java temurin-11.0.13+8
  2. Run asdf shell java temurin-11.0.13+8
  3. Run 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:

tmp.pLplZRHBjQ ❯❯❯ asdf install java temurin-11.0.13+8
############################################################################################################ 100.0%############################################################################################################ 100.0%
OpenJDK11U-static-libs-musl_x64_alpine-linux_hotspot_11.0.13_8.tar.gz
OpenJDK11U-static-libs-musl_x64_alpine-linux_hotspot_11.0.13_8.tar.gz: OK
tmp.pLplZRHBjQ ❯❯❯ asdf shell java temurin-11.0.13+8
tmp.pLplZRHBjQ ❯❯❯ asdf which javac
unknown command: javac. Perhaps you have to reshim?
✘ tmp.pLplZRHBjQ ❯❯❯ asdf where java
/home/ben/.asdf/installs/java/temurin-11.0.13+8
tmp.pLplZRHBjQ ❯❯❯ exa -T $(asdf where java)
/home/ben/.asdf/installs/java/temurin-11.0.13+8
└── lib
   └── static
      └── linux-amd64
         └── musl
            ├── libattach.a
            ├── libawt.a
            ├── libawt_headless.a
            ├── libdt_socket.a
            ├── libextnet.a
            ├── libfdlibm.a
            ├── libfontmanager.a
            ├── libinstrument.a
            ├── libj2gss.a
            ├── libj2pcsc.a
            ├── libj2pkcs11.a
            ├── libjaas.a
            ├── libjava.a
            ├── libjavajpeg.a
            ├── libjawt.a
            ├── libjdwp.a
            ├── libjimage.a
            ├── libjli.a
            ├── libjsig.a
            ├── libjsound.a
            ├── liblcms.a
            ├── libmanagement.a
            ├── libmanagement_agent.a
            ├── libmanagement_ext.a
            ├── libmlib_image.a
            ├── libnet.a
            ├── libnio.a
            ├── libprefs.a
            ├── librmi.a
            ├── libsaproc.a
            ├── libsctp.a
            ├── libsunec.a
            ├── libunpack.a
            ├── libverify.a
            └── libzip.a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions