The Firebase Emulator Suite runs Firestore and Storage emulators inside a JVM, so starting the suite requires a Java JDK 11+ that the CLI can execute. This error means the CLI failed to spawn `java -version` during initialization, which stops every Java-backed emulator before it can boot.
Starting the Emulator Suite triggers a quick health check that runs `java -version` to confirm a suitable runtime is installed. Firestore, Storage, and the rules runtime are distributed as Java binaries, so if that command can't be spawned (missing binary, broken PATH, or insufficient permissions) the CLI aborts with "Could not spawn java -version" before any emulator starts. The official documentation lists Java JDK 11 or higher as a prerequisite and explains how the JVM options can be customized, so the local environment must expose a compatible java executable before the CLI can download and launch the Java emulators.
Run java -version in the same shell where you start the emulator:
java -versionThe CLI expects Java 11 or higher (per the emulator docs). If the command prints a version lower than 11, emits an error, or shows "command not found", install or update your JDK before continuing.
If Java is missing or too old, install a supported distribution:
- macOS/Linux: use your package manager (brew install openjdk@11, sudo apt install openjdk-11-jdk, etc.).
- Windows: download a JDK 11+ build from https://jdk.java.net/ or Eclipse Temurin, install it, and follow the installer instructions.
After installing, close and reopen your terminal so the new java binary is visible to the shell.
Ensure PATH (and optionally JAVA_HOME) include the JDK bin directory so the CLI can spawn the java binary. On Linux/macOS run which java and on Windows use where java or PowerShell's Get-Command java. If the command points to the wrong location, update your environment variables (e.g., add export PATH="$JAVA_HOME/bin:$PATH" or add the bin directory to the Windows PATH) and restart the CLI shell. Also verify no wrapper scripts prevent execution or strip the PATH when running firebase emulators:start.
With a working Java runtime, restart the emulator:
firebase emulators:startIt should now proceed past the Java health check, download the emulator JARs, and start the Firestore/Storage services. If you still see Java-related errors, inspect the console output for the actual java command that failed and adjust the PATH or permissions accordingly.
The Cloud Firestore and Cloud Storage emulators launch JVMs inside the CLI, so environment tweaks that help the JVM (such as JAVA_TOOL_OPTIONS="-Xmx2g") can be applied once the runtime is reachable. When running the suite in CI, export PATH and JAVA_HOME before invoking firebase emulators:start so that non-login shells can spawn java. The CLI only performs the java -version check during startup, so fixing the PATH and rerunning the command usually clears the error permanently.
messaging/UNSPECIFIED_ERROR: No additional information available
How to fix "messaging/UNSPECIFIED_ERROR: No additional information available" in Firebase Cloud Messaging
App Check: reCAPTCHA Score Too Low
App Check reCAPTCHA Score Too Low
storage/invalid-url: Invalid URL format for Cloud Storage reference
How to fix invalid URL format in Firebase Cloud Storage
auth/missing-uid: User ID identifier required
How to fix "auth/missing-uid: User ID identifier required" in Firebase
auth/invalid-argument: Invalid parameter passed to method
How to fix "auth/invalid-argument: Invalid parameter passed to method" in Firebase