Java
Curated name java. Installs a JDK via the upstream
devcontainers/features/java
feature. Monoceros turns on Maven and Gradle by default (the upstream
feature ships only the JDK), so a plain languages: [java] is build-ready out
of the box.
Add it
Section titled “Add it”monoceros init acme --with-languages=javamonoceros add-language acme java:21Either writes the object form into the yml, with the version and the Maven/Gradle toggles inline and editable:
languages: - java: version: latest installMaven: true installGradle: trueRemove it
Section titled “Remove it”monoceros remove-language acme javaOr delete the entry from acme.yml by hand and re-run monoceros apply acme -
the yml is the source of truth.
Pinning a version
Section titled “Pinning a version”Pin a JDK major with the :version suffix; it lands in the version key
above.
monoceros add-language acme java:21Supported JDK majors: 21, 17, 11, 8 (also latest).
Options
Section titled “Options”version, installMaven and installGradle are surfaced in the yml - edit
them in place (e.g. set installMaven: false), then monoceros apply. Other
options are set by adding the feature directly (see
Other feature options):
| Option | Default | Where to set |
|---|---|---|
version | latest | yml (:version suffix or the version key) |
installMaven | true (Monoceros default; upstream false) | yml |
installGradle | true (Monoceros default; upstream false) | yml |
jdkDistro | ms | add-feature (ms, open, oracle, tem, amzn) |
mavenVersion / gradleVersion | latest | add-feature |
Full option list: upstream feature.