Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ vfox install java@21-tem
vfox use --global java@21-tem
```

Unreleased: release 0.6.1, the newest when this was written, installs `21+35-tem` here, and `vfox use --global java@21-tem` then fails with `java@21-tem is not installed`. Use the name that `vfox install` prints, or [install from source](docs/install-from-source.md).

You can verify this using the following command:

```bash
Expand All @@ -34,8 +32,6 @@ java -version

`vfox search java tem` lists the Temurin releases, and in an interactive terminal it lets you pick one and installs it.

Behavior that only exists on `main` and not in the latest release is marked "Unreleased" in the pages below. [docs/changes.md](docs/changes.md) lists it, and [docs/install-from-source.md](docs/install-from-source.md) gets you `main`.

## Versions and names

A version is `<version>-<distribution>`, such as `21.0.8-tem`, with `-fx` after it for JavaFX. Without a distribution you get OpenJDK from jdk.java.net, which has nothing newer than 17.0.2 for 17 and 21.0.2 for 21. See [docs/versions.md](docs/versions.md) for details.
Expand Down
4 changes: 0 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ vfox install java@21-tem
vfox use --global java@21-tem
```

未发布:0.6.1(写这篇文档时最新的发布版)在这里装的是 `21+35-tem`,随后 `vfox use --global java@21-tem` 会报 `java@21-tem is not installed`。请改用 `vfox install` 打印出的名字,或者[从源码安装](docs/zh-CN/install-from-source.md)。

可以用下面的命令验证:

```bash
Expand All @@ -34,8 +32,6 @@ java -version

`vfox search java tem` 会列出 Temurin 的各个版本,在交互式终端里还可以直接选一个并安装。

只存在于 `main`、还没进入最新发布版的行为,在下面各页里标有“未发布”。完整列表见 [docs/zh-CN/changes.md](docs/zh-CN/changes.md),想直接用上 `main`,见 [docs/zh-CN/install-from-source.md](docs/zh-CN/install-from-source.md)。

## 版本与命名

版本写成 `<版本>-<发行版>`,例如 `21.0.8-tem`,后面加 `-fx` 表示带 JavaFX。不写发行版时得到的是 jdk.java.net 上的 OpenJDK,它的 17 只到 17.0.2,21 只到 21.0.2。详见 [docs/zh-CN/versions.md](docs/zh-CN/versions.md)。
Expand Down
8 changes: 4 additions & 4 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

[中文](zh-CN/changes.md) | [English](changes.md)

What changed in each release, as a user notices it. GitHub's release pages list the pull requests. The newest release at the time of writing is 0.6.1, and `main` is ahead of it by everything under "Unreleased". [install-from-source.md](install-from-source.md) gets you those changes now.
What changed in each release, as a user notices it. GitHub's release pages list the pull requests.

## Unreleased
## 0.6.2 (2026-10-18)

- `.sdkmanrc` works under vfox 1.x again. Release 0.6.1 fails with `expected 0 arguments for func() []string, got 1` under vfox 1.x (tested with 1.0.12 and 1.0.13), and vfox hides the error ([#65](https://github.com/version-fox/vfox-java/pull/65)).
- `vfox use java@21`, a bare major, works under vfox 1.0.13. Release 0.6.1 fails there with `cannot unmarshal string into plugin.PreUseHookResult` ([#65](https://github.com/version-fox/vfox-java/pull/65)).
- `.sdkmanrc` matches SDKMAN's `jbr` and JavaFX identifiers ([#78](https://github.com/version-fox/vfox-java/pull/78)), zero-padded releases ([#85](https://github.com/version-fox/vfox-java/pull/85)) and early-access identifiers ([#88](https://github.com/version-fox/vfox-java/pull/88), [#96](https://github.com/version-fox/vfox-java/pull/96)). It selects the JDK it names when several of the same major are installed ([#84](https://github.com/version-fox/vfox-java/pull/84)). See [sdkmanrc.md](sdkmanrc.md).
- A bare major installs the newest release. `java@21-tem` is `21.0.12.1+1-tem` and not `21+35-tem` ([#74](https://github.com/version-fox/vfox-java/pull/74)). `java@25-graal` installs `25.0.4.1-graal`, the newest build of the 25.0 line, where release 0.6.1 installed `25-graal` ([#101](https://github.com/version-fox/vfox-java/pull/101)).
- `vfox use java@21.0.8-tem` finds the installed `21.0.8+9-tem` ([#76](https://github.com/version-fox/vfox-java/pull/76)). The same goes for OpenJDK names with `-open` or `openjdk-` ([#77](https://github.com/version-fox/vfox-java/pull/77)) and for zero-padded releases ([#92](https://github.com/version-fox/vfox-java/pull/92)).
- `java@21.0.5+63130-jb` installs the build it names and not the newest build of the release ([#83](https://github.com/version-fox/vfox-java/pull/83)).
- `java@21.0.5+63130-jb` and `java@28.ea.15-open` install the build they name and not the newest build of the release ([#83](https://github.com/version-fox/vfox-java/pull/83)).
- `vfox search` on Windows lists releases that ship only as tar.gz ([#81](https://github.com/version-fox/vfox-java/pull/81)).
- The plugin no longer sets `GRAALVM_HOME` ([#93](https://github.com/version-fox/vfox-java/pull/93)).
- `java@tem`, a distribution without a version, asks for one instead of failing with a Lua error ([#99](https://github.com/version-fox/vfox-java/pull/99)).
- `java@tem` and `java@-tem`, a distribution without a version, ask for one. Release 0.6.1 stops with `attempt to index a non-table object(nil) with key 'match'` for the first and installs the newest release for the second ([#99](https://github.com/version-fox/vfox-java/pull/99)).
- `vfox search` no longer marks GraalVM's monthly feature releases as LTS ([#100](https://github.com/version-fox/vfox-java/pull/100)).
- The repository has a container e2e suite for Linux and Windows, see [e2e.md](e2e.md) ([#65](https://github.com/version-fox/vfox-java/pull/65), [#82](https://github.com/version-fox/vfox-java/pull/82)).

Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ The ids are Foojay's (`oracle_open_jdk` is `open`). The notes under "Only some r

A maintainer runs **Actions → Plugin → Run workflow** on the default branch with the version, without `v`. The README describes what the shared workflow does. Afterwards `plugins/java.json` in [vfox-plugins](https://github.com/version-fox/vfox-plugins) shows the version that `vfox add java` serves.

The documentation marks what is newer than the last release with "Unreleased" ("未发布" in Chinese). After a release, move those entries in [changes.md](changes.md) under the new version and take the remarks out, in both languages: `grep -rn -i -e unreleased -e 未发布 docs README*`.
The documentation marks what is newer than the last release with "Unreleased" ("未发布" in Chinese). After a release, move those entries in [changes.md](changes.md) under the new version and take the remarks out, in both languages: `grep -rn -i -e unreleased -e 未发布 docs README*`. Also search for the number of the previous release: a few sentences compare against it without saying "Unreleased".

## Writing the docs

Expand Down
10 changes: 5 additions & 5 deletions docs/distributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ Mandrel and Liberica NIK numbered their releases after themselves up to version

### Behavior of Oracle GraalVM and GraalVM Community

- Since 25.1 (June 2026) GraalVM puts out a feature release every month next to its 25.0 line: `25.1.3`, `25.2.4`, `25.3.4.1`, `25.4.4.1`. Each is replaced within about a month. Foojay marks them LTS because the JDK they build on is LTS, and `vfox search` leaves the LTS note off them. Unreleased: 0.6.1 still adds the note.
- `java@25-graal` installs the newest build of the 25.0 line (`25.0.4.1-graal`), the line Oracle's own `25/latest` download follows. A feature release needs its full version: `java@25.4.4.1-graal`. Unreleased: 0.6.1 installed the GA build `25-graal`.
- GraalVM Community's 25.0 line ended with `25.0.2`, and the feature releases are all it still ships. `java@25-graalce` installs the newest of them, `25.4.4.1-graalce` on 2026-10-18. Unreleased: 0.6.1 installs the GA build `25-graalce`.
- The plugin sets `JAVA_HOME` and `PATH`, and no `GRAALVM_HOME`. A `GRAALVM_HOME` that points at a GraalVM of your own stays as it is, and the native-image build plugins fall back to `JAVA_HOME` when it is unset. Unreleased: 0.6.1 set `GRAALVM_HOME` for `graal` and `graalce`, replacing yours.
- Since 25.1 (June 2026) GraalVM puts out a feature release every month next to its 25.0 line: `25.1.3`, `25.2.4`, `25.3.4.1`, `25.4.4.1`. Each is replaced within about a month. Foojay marks them LTS because the JDK they build on is LTS, and `vfox search` leaves the LTS note off them.
- `java@25-graal` installs the newest build of the 25.0 line (`25.0.4.1-graal`), the line Oracle's own `25/latest` download follows. A feature release needs its full version: `java@25.4.4.1-graal`.
- GraalVM Community's 25.0 line ended with `25.0.2`, and the feature releases are all it still ships. `java@25-graalce` installs the newest of them, `25.4.4.1-graalce` on 2026-10-18.
- The plugin sets `JAVA_HOME` and `PATH`, and no `GRAALVM_HOME`. A `GRAALVM_HOME` that points at a GraalVM of your own stays as it is, and the native-image build plugins fall back to `JAVA_HOME` when it is unset.
- There is no Windows ARM64 and no Alpine build, and Intel Macs get nothing after 25.0.1. See [platforms.md](platforms.md#graalvm).

## Others

### JetBrains Runtime (`jb`)

The [fork of OpenJDK](https://github.com/JetBrains/JetBrainsRuntime) that JetBrains' IDEs run on. Java 11, 17, 21 and 25. On Windows some releases ship only as tar.gz. The plugin installs those, and `vfox search` lists them. Unreleased: 0.6.1 does not list them.
The [fork of OpenJDK](https://github.com/JetBrains/JetBrainsRuntime) that JetBrains' IDEs run on. Java 11, 17, 21 and 25. On Windows some releases ship only as tar.gz. The plugin installs those, and `vfox search` lists them.

### TravaOpenJDK (`trava`)

Expand Down
4 changes: 1 addition & 3 deletions docs/foojay.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ https://api.foojay.io/disco/v3.0/packages/jdks

Without `latest=available`, `version=21` matches the 21 GA build only (`21+35`). With it Foojay picks the newest 21.x, which is what `java@21-tem` installs. Longer versions match as they are.

Unreleased: release 0.6.1 sends a `+` as it is, never adds `latest=available` (so `java@21-tem` installs `21+35-tem`), and on Windows asks for `zip` only, falling back to `tar.gz` when that returns nothing.

The answer is a list of packages. The plugin names a release after `java_version`, adds `-fx` where `javafx_bundled` is true, marks it LTS where `term_of_support` is `lts`, and prefers a `zip` over a `tar.gz` of the same version on Windows. For the install it then fetches the package's `links.pkg_info_uri` and downloads its `direct_download_uri`, which is a vendor's own server (GitHub Releases for Temurin). That record also holds a `checksum`. The plugin does not pass it on, so vfox prints `WARNING: Checksum is not provided, skip verify...` and does not verify the download.

`vfox search` differs from the raw list in a few ways. It lists a name once where Foojay has two records for it, and it leaves the LTS note off GraalVM's feature releases (unreleased, see [distributions.md](distributions.md#behavior-of-oracle-graalvm-and-graalvm-community)). It only lists GA releases.
`vfox search` differs from the raw list in a few ways. It lists a name once where Foojay has two records for it, and it leaves the LTS note off GraalVM's feature releases (see [distributions.md](distributions.md#behavior-of-oracle-graalvm-and-graalvm-community)). It only lists GA releases.

## Which distributions have a build for my platform

Expand Down
4 changes: 2 additions & 2 deletions docs/install-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[中文](zh-CN/install-from-source.md) | [English](install-from-source.md)

`vfox add java` installs the latest release. `main` has fixes that are not in it yet ([changes.md](changes.md)), and a change you are working on is not in any release. A plugin is a `metadata.lua` plus the `hooks` and `lib` directories, and vfox adds one from a zip of them.
`vfox add java` installs the latest release. To try `main` before its next release, or a change you are working on, build the plugin from source. A plugin is a `metadata.lua` plus the `hooks` and `lib` directories, and vfox adds one from a zip of them.

## Ubuntu 26.04

Expand Down Expand Up @@ -40,7 +40,7 @@ vfox use --global java@21-tem
java -version
```

A build of `main` installs the newest Temurin 21 (`21.0.12.1+1-tem` on 2026-10-18). Release 0.6.1 installs `21+35-tem`, the first build of 21.
`vfox install java@21-tem` installs the newest Temurin 21, `21.0.12.1+1-tem` on 2026-10-18.

## When java is already added

Expand Down
2 changes: 0 additions & 2 deletions docs/sdkmanrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ java=21.0.8-tem

Only the `java=` line is read. Other lines, such as `maven=3.9.9`, are not this plugin's business.

> Unreleased: release 0.6.1 cannot read `.sdkmanrc` under vfox 1.x. Its hook calls `ctx:getInstalledVersions()`, which every vfox 1.x rejects (tested with 1.0.12 and 1.0.13) with `expected 0 arguments for func() []string, got 1`, and vfox drops that error, so nothing happens. `main` fixes it, matches more of SDKMAN's spellings (`jbr`, JavaFX, zero padding, early access) and picks the right JDK when several of one major are installed. Try it with [install-from-source.md](install-from-source.md). The details are in [changes.md](changes.md).

## Using it

```bash
Expand Down
4 changes: 2 additions & 2 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Foojay has no package for that release, distribution and flavour on this platfor

### `No version in tem; add one, such as 21-tem. Please check available versions with 'vfox search java tem'`

The spec holds a distribution and no version. `java@-tem`, `java@temurin-` and `java@zulu-fx` are the same case. Unreleased: 0.6.1 stops with `attempt to index a non-table object(nil) with key 'match'` for `java@tem`, and installs the newest release for `java@-tem`.
The spec holds a distribution and no version. `java@-tem`, `java@temurin-` and `java@zulu-fx` are the same case.

### `Could not extract a valid distribution: 21-foo`

Expand Down Expand Up @@ -65,7 +65,7 @@ While `proxy.enable` is `false`, the usual `HTTP_PROXY`, `HTTPS_PROXY` and `NO_P
- **`WARNING: Checksum is not provided, skip verify...` on every install.** The plugin does not pass a checksum to vfox, so the download is not verified, see [foojay.md](foojay.md#what-the-plugin-asks).
- **The installed name has a build number you did not type.** `java@21.0.8-tem` installs `21.0.8+9-tem`. The build is part of the name, see [versions.md](versions.md#installed-names).
- **`vfox install java@21-tem` and `vfox install java tem` do different things.** The second one is two SDKs, `java` and `tem`.
- **A `GRAALVM_HOME` you set is left alone.** The plugin sets `JAVA_HOME` and `PATH` only. Unreleased: 0.6.1 replaced it for GraalVM.
- **A `GRAALVM_HOME` you set is left alone.** The plugin sets `JAVA_HOME` and `PATH` only.

## Where the JDK is

Expand Down
16 changes: 5 additions & 11 deletions docs/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ vfox install java@21 # no distribution: OpenJDK from jdk.java.net

The distribution is a short name (`tem`) or a long name (`temurin`). Both lists are in [distributions.md](distributions.md). `-fx` goes last and asks for a JavaFX build, see [javafx.md](javafx.md).

> This page describes `main`. Release 0.6.1, the newest one when this was written, differs in places marked "Unreleased", and [changes.md](changes.md) lists all of them.

## Without a distribution

`java@21` means OpenJDK as published on [jdk.java.net](https://jdk.java.net/), and its installed name has no suffix (`21.0.2+13`). That site carries the newest releases and the last build of older ones: 17 stops at `17.0.2`, 21 at `21.0.2`. So `vfox install java@17.0.17` fails, while `java@17.0.17-tem` works. For a release that is still maintained, name a distribution.
Expand All @@ -25,14 +23,14 @@ The distribution is a short name (`tem`) or a long name (`temurin`). Both lists

`vfox install` asks the plugin which package matches, then vfox downloads and unpacks it.

- A bare major (`21`, `21-tem`) installs the newest release of that major the distribution lists, for example `21.0.12.1+1-tem` on 2026-10-18. Unreleased: 0.6.1 installed the first GA build, `21+35-tem`.
- A bare major (`21`, `21-tem`) installs the newest release of that major the distribution lists, for example `21.0.12.1+1-tem` on 2026-10-18.
- A longer version must match a release the distribution lists. `21.0.8-tem` installs `21.0.8+9-tem`, the newest build of 21.0.8. A release nobody published fails with `No JDK found for 21.0.99-tem on linux/amd64`.
- A build number selects that build: `21.0.5+63130-jb`. Unreleased: 0.6.1 installed the newest build of the release instead.
- A build number selects that build: `21.0.5+63130-jb`.
- A release padded with zeros, as SDKMAN writes it, is accepted: `27.0.0-librca` installs `27+36-librca`.
- Oracle GraalVM's bare major installs the newest build of its 25.0 line, not one of the monthly feature releases, which have to be named in full (`25.4.4.1-graal`). See [GraalVM](distributions.md#graalvm-family). Unreleased: 0.6.1 installed the GA build, `25-graal`.
- Oracle GraalVM's bare major installs the newest build of its 25.0 line, not one of the monthly feature releases, which have to be named in full (`25.4.4.1-graal`). See [GraalVM](distributions.md#graalvm-family).
- With `-fx` only JavaFX builds are considered, without it only builds without JavaFX. The two are never mixed.
- On Windows a release shipped as zip and as tar.gz installs from the zip.
- A distribution without a version (`java@tem`, `java@-tem`, `java@zulu-fx`) is rejected with a message that asks for one. Unreleased: 0.6.1 failed with a Lua error for `java@tem` and installed the newest release for `java@-tem`.
- A distribution without a version (`java@tem`, `java@-tem`, `java@zulu-fx`) is rejected with a message that asks for one.

An install that finds the name already present prints `java@21.0.12.1+1-tem is already installed` and downloads nothing.

Expand Down Expand Up @@ -75,8 +73,6 @@ vfox uninstall java@21.0.8+9-tem

If you name a build or a release, it does not cross over to another one (`21.0.12-tem` does not select `21.0.12.1+1-tem`). It does not cross to another distribution, between JavaFX and plain, or between early-access and GA either. A name that matches nothing is reported as `java@99-tem is not installed`.

Unreleased: 0.6.1 passed what you typed on as it was, so `vfox use java@21.0.8-tem` found nothing and needed the full name, `21.0.8+9-tem`. The same goes for the `-open` and `openjdk-` spellings and for zero-padded releases. Under vfox 1.0.13 and later, `vfox use java@21` and `java@21-open` fail outright with 0.6.1, with `cannot unmarshal string into plugin.PreUseHookResult`, because it answers a bare major with an empty string.

Pick the scope with `vfox use`'s flags: `--global`, `--project` or `--session`, the default. In a shell without vfox's hook, Windows switches to the global scope with a warning, while Linux and macOS stop with `vfox requires hook support`. `--project` writes a `.vfox.toml` that holds the installed name (`java = "17.0.10+7-tem"`). A `.sdkmanrc` is read as well, see [sdkmanrc.md](sdkmanrc.md).

## Early-access builds
Expand All @@ -88,8 +84,6 @@ vfox install java@28.ea-open # newest early-access build, 28-ea+19 on 2026
vfox install java@28.ea.15-open # 28-ea+15
```

Unreleased: 0.6.1 ignores the build number and installs the newest early-access build.

The installed name uses Foojay's spelling, `28-ea+19`, and `vfox use java@28-ea+19` takes it as it is. `vfox search` lists GA releases only. Foojay lists early-access builds for OpenJDK, Temurin, Zulu, SapMachine, GraalVM and GraalVM Community, among others. Vendors remove old ones from their servers while Foojay keeps the record, so an old build may fail to download.

## Searching
Expand Down Expand Up @@ -117,4 +111,4 @@ The list holds what exists for the machine you run it on, see [platforms.md](pla

`vfox install java tem` does not select Temurin: arguments separated by spaces are several SDKs. Write `java@21-tem`.

The LTS note is Foojay's, except that GraalVM's monthly feature releases (`25.4.4.1-graal`) carry none, though Foojay marks them LTS. Unreleased: 0.6.1 still adds the note.
The LTS note is Foojay's, except that GraalVM's monthly feature releases (`25.4.4.1-graal`) carry none, though Foojay marks them LTS.
Loading
Loading