Cordova 129 itself runs on Node.js 2,131 , but the Android project it generates is built by Gradle 19,597 , and Gradle runs on the Java Virtual Machine. The Android Gradle Plugin 234 (AGP), which teaches Gradle how to turn Java, Kotlin and resources into an APK, has required JDK 17 since AGP 8.0. cordova-android 15.1.0 bundles AGP 8.10.1 and Gradle 8.14.2, so Cordova's documentation asks for JDK 17 for cordova-android 13, 14 and 15. Releases 10 to 12 wanted JDK 11 and release 9 and earlier wanted JDK 8, which is why older tutorials tell you to install Java 8.
You need a full JDK, not just a Java runtime: cordova-android checks your Java by running javac -version, and a JRE has no javac. Any OpenJDK 10,925 build works. On Ubuntu 225 , sudo apt install openjdk-17-jdk-headless; on macOS with Homebrew 6,457 , brew install openjdk@17; on Windows, winget 26,463 install Microsoft.OpenJDK.17 installs Microsoft's OpenJDK build. The build machine has two JDKs, because Capacitor 8 243,123 (Capacitor) insists on Java 21:
java -version
javac -version
readlink -f /usr/bin/java
ls -d /usr/lib/jvm/java-??-openjdk-amd64openjdk version "17.0.20.1" 2026-08-18 OpenJDK Runtime Environment (build 17.0.20.1+1-1-26.04-Ubuntu) OpenJDK 64-Bit Server VM (build 17.0.20.1+1-1-26.04-Ubuntu, mixed mode, sharing) javac 17.0.20.1 /usr/lib/jvm/java-21-openjdk-amd64/bin/java /usr/lib/jvm/java-17-openjdk-amd64 /usr/lib/jvm/java-21-openjdk-amd64
Look at the fifth line. The system default /usr/bin/java is JDK 21, because Ubuntu's alternatives system prefers the newest installed version; java -version reports 17 only because $JAVA_HOME/bin comes first on this machine's PATH (JAVA_HOME and PATH). That is the most common JDK trap: installing a second JDK silently changes which one your builds use.