Repository navigation
[BUG]: Mandrel releases such as java@23.1.12-mandrel no longer install, and java@21-mandrel installs Mandrel 23.1.8 #106
Description
Version
vfox-java main (db38b70) and v0.6.2, vfox 1.0.13
OS
Linux
Describe the bug
Foojay now gives each Mandrel package the JDK major as java_version and keeps Mandrel's own number in distribution_version. The plugin names installs after java_version, so Mandrel's numbers no longer install, vfox search java mandrel lists one name per JDK major, and a bare major does not get the newest release:
$ vfox install java@23.1.12-mandrel
plugin [PreInstall] method error: ~/.vfox/plugin/java/hooks/pre_install.lua:41: No JDK found for 23.1.12-mandrel on linux/amd64. Please check available versions with 'vfox search java'
failed to install java
$ vfox install java@21-mandrel
Preinstalling java@21-mandrel...
Verifying checksum ...
WARNING: Checksum is not provided, skip verify...
Unpacking ~/.vfox/cache/java/mandrel-java21-linux-amd64-23.1.8.0-Final.tar.gz...
Install java@21-mandrel success!
Please use `vfox use java@21-mandrel` to use it.
$ vfox use --global java@21-mandrel
Now using java@21-mandrel.
$ native-image --version
native-image 21.0.8 2025-07-15
OpenJDK Runtime Environment Mandrel-23.1.8.0-Final (build 21.0.8+9-LTS)
OpenJDK 64-Bit Server VM Mandrel-23.1.8.0-Final (build 21.0.8+9-LTS, mixed mode)
$ vfox search java mandrel
Available versions:
- 25-mandrel (LTS)
- 24-mandrel
- 23-mandrel
- 22-mandrel
- 21-mandrel (LTS) (installed)
- 20-mandrel
- 17-mandrel (LTS)
- 11-mandrel (LTS)
Download progress and the stack trace are trimmed. For JDK 21, Foojay lists 23.1.12.1 first, but a bare major asks with latest=available, and then Foojay answers with 23.1.8:
$ curl -s 'https://api.foojay.io/disco/v3.0/packages/jdks?version=21&distribution=mandrel&architecture=x64&archive_type=tar.gz&operating_system=linux&lib_c_type=glibc&directly_downloadable=true&latest=available' | jq -r '.result[] | [.java_version, .distribution_version, .filename] | @tsv'
21 23.1.8 mandrel-java21-linux-amd64-23.1.8.0-Final.tar.gz
Lines 128 to 131 in db38b70
| -- A bare major such as 21 matches only its GA build (21+35); latest=available | |
| -- picks the newest 21.x instead. Longer versions keep matching exactly, as | |
| -- latest=available would look at the major alone. | |
| local latest = version:match("^%d+$") and "&latest=available" or "" |
My guess is that Foojay cannot tell which one is newest when every JDK 21 package has the same java_version. 25-mandrel gets 25.0.1.0 the same way, where 25.0.4.1 is out. 23-mandrel has changed meaning as well: it was Mandrel 23 and is now JDK 23, which is Mandrel 24.1.2. When v0.6.2 came out on 2026-10-18, Foojay listed Mandrel up to 24 under Mandrel's numbers and 25 under the JDK's, as the docs say:
vfox-java/docs/distributions.md
Line 147 in db38b70
| Mandrel and Liberica NIK numbered their releases after themselves up to version 24 (Mandrel `23.1.12`), and number them after the JDK from 25 on (`25.0.4.1`). |
Liberica NIK changed the other way. Its java_version is now the full JDK version for every release, so java@21-nik picks 21.0.12.1+2-nik, which is NIK 23.1.12.1 and the newest. What it lost is NIK's own numbers: java@23.1.8-nik fails with No JDK found, and 23-nik is now JDK 23, which is NIK 24.1.2.
Foojay accepts distribution_version as a query parameter, and with the same platform parameters distribution=mandrel&distribution_version=23.1.12.1 returns that one package. Naming Mandrel installs after distribution_version could bring Mandrel's numbers back, and a bare major would then have to find the newest distribution_version itself.
Also written for the old numbering: the comment in hooks/available.lua (L19-L22), the Mandrel and NIK ranges on Apple silicon in docs/platforms.md (L56), the 23.1.12-mandrel case and its comment in tests/pre_install_test.lua (L345-L354), and the same places in docs/zh-CN.
Found while adding the distributions in #104, and checked again while working on version-fox/vfox#390.
Activity
linghengqian commentedon Oct 20, 2026
I am working on the current issue.