From ed192cd2e584f159ce35c3ed8d09ff592fc815cd Mon Sep 17 00:00:00 2001 From: Daniel Krupitsky <34886222+dkwi@users.noreply.github.com> Date: Thu, 28 Mar 2024 12:46:43 +0100 Subject: [PATCH 1/2] Update java.md Added a short explanation about how to force unavailable java version to exist in mise. Very hacky. Once I'll have some free time I'll create a PR with an actual solution to allow this functionality. --- lang/java.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lang/java.md b/lang/java.md index 80a0f6f..691c7a5 100644 --- a/lang/java.md +++ b/lang/java.md @@ -39,3 +39,28 @@ sudo ln -s ~/.local/share/mise/installs/java/openjdk-20/Contents /Library/Java/J The Java core plugin supports the legacy version files `.java-version` and `.sdkmanrc`. For `.sdkmanrc` files, mise will try to map the vendor and version to the appropriate version string. For example, the version `20.0.2-tem` will be mapped to `temurin-20.0.2`. Due to Azul's Zulu versioning, the version `11.0.12-zulu` will be mapped to the major version `zulu-11`. Not all vendors available in SDKMAN are supported by mise. The following vendors are NOT supported: `bsg` (Bisheng), `graal` (GraalVM), `nik` (Liberica NIK). + +In case an unsupported version of java is needed, some manual work is required: + +1. Download the unsupported version to a directory (e.g `~/.sdkman/candidates/java/21.0.1-open`) +2. symlink the new version: + ```sh + ln -s ~/.sdkman/candidates/java/21.0.1-open ~/.local/share/mise/installs/java/21.0.1-open + ``` +3. If on Mac: + ```sh + mkdir ~/.local/share/mise/installs/java/21.0.1-open/Contents + mkdir ~/.local/share/mise/installs/java/21.0.1-open/Contents/MacOS + + ln -s ~/.sdkman/candidates/java/21.0.1-open ~/.local/share/mise/installs/java/21.0.1-open/Contents/Home + cp ~/.local/share/mise/installs/java/21.0.1-open/lib/libjli.dylib ~/.local/share/mise/installs/java/21.0.1-open/Contents/MacOS/libjli.dylib + ``` +4. Don't forget to make sure the cache is blocked and valid, by making sure an **empty** directory **exists** for your version in the [mise cache](https://mise.jdx.dev/directories.html#cache-mise): + e.g. + ```sh + $ ls -R $MISE_CACHE_SIR/java + 21.0.1-open + + mise/java/21.0.1-open: + + ``` From 1f9d3b4caa7aa8751abec17088458a1113254cb6 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Sat, 1 Jun 2024 08:37:54 -0500 Subject: [PATCH 2/2] Update java.md --- lang/java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/java.md b/lang/java.md index 691c7a5..7ddd162 100644 --- a/lang/java.md +++ b/lang/java.md @@ -58,7 +58,7 @@ In case an unsupported version of java is needed, some manual work is required: 4. Don't forget to make sure the cache is blocked and valid, by making sure an **empty** directory **exists** for your version in the [mise cache](https://mise.jdx.dev/directories.html#cache-mise): e.g. ```sh - $ ls -R $MISE_CACHE_SIR/java + $ ls -R $MISE_CACHE_DIR/java 21.0.1-open mise/java/21.0.1-open: