OpenJDK 21 runtime + JDK tools layer for OpenCharly images.
The java-openjdk candy installs OpenJDK 21 (headless runtime + JDK tools)
cross-distro — Fedora ships java-21-openjdk-headless/-devel, Arch ships
jdk21-openjdk, Debian/Ubuntu ship openjdk-21-jdk-headless. A build step
symlinks a distro-agnostic JAVA_HOME (/usr/lib/jvm/charly-jdk21) onto
whichever JDK 21 root the package installed, so consumers (Gradle, sbt) discover
java and javac without hardcoding a distro path.
On Arch/CachyOS the step also points archlinux-java at the installed JDK 21 so
/usr/bin/java and /usr/bin/javac resolve (their default-runtime ships
unset until archlinux-java set runs).
| Property | Value |
|---|---|
| Layer / candy | java-openjdk |
| Packages | java-21-openjdk-headless + -devel (fedora), jdk21-openjdk (arch), openjdk-21-jdk-headless (debian/ubuntu) |
| Environment | JAVA_HOME=/usr/lib/jvm/charly-jdk21, PATH += $JAVA_HOME/bin |
| Binaries | /usr/bin/java, /usr/bin/javac |
| Install files | charly.yml (run: step) |
| Service / port | none |
Compose the layer by pinning this repo in a box's nested candy: list. In the
real box schema an image is a single candy: node whose body carries base:
and a nested candy: list (there is no box-level base: sibling — see
/charly-image:image and a live example such as
distro-cachyos/box/comfyui/charly.yml):
my-box:
candy:
base: fedora
candy:
- '@github.com/opencharly/layer-java-openjdk:v2026.239.1627'After the image is built:
java -version # openjdk version "21..."
javac -version
echo "$JAVA_HOME" # /usr/lib/jvm/charly-jdk21charly.yml— thejava-openjdk:candy entity: theenv:/path_append:wiring, the per-distrodistro:package arms, therun:symlink step, and thecheck:assertions. Noskill:entity yet.CHANGELOG/— per-CalVer release notes..github/workflows/tag-on-merge.yml— CalVer tag +CHANGELOG/on merge.README.md— this user overview.
- Owning skill: none yet — this candy carries no
skill:entity. Closest:/charly-image:layer(candy authoring). The gap is tracked in opencharly/opencharly#291. opencharly/charly— the charly CLI and image builderopencharly/opencharly— the umbrella