Search code examples
firebasefirebase-realtime-databaseemulationfirebase-tools

Firebase Emulator Error: firebase-tools no longer supports Java version before 11


I am using Firebase Functions, Realtime Database & Hosting in my firebase project. I installed & configured local emulator suit for my project. But when I am writing firebase emulators:start command in Visual Studio Code terminal to use emulator, it gives me below Error.

!!  emulators: firebase-tools no longer supports Java version before 11. Please upgrade to Java version 11 or above to continue using 
the emulators.
i  emulators: Shutting down emulators.

Error: firebase-tools no longer supports Java version before 11. Please upgrade to Java version 11 or above to continue using the emulators.

I tried using firebase emulators:start --only hosting & firebase emulators:start --only functions. Both of them are working fine. But when I tried firebase emulators:start --only database It gives me the same error.

To check the Java version installed in my windows 10 pc , I typed java -version. in my CMD. It gave me below output.

java version "19.0.2" 2023-01-17
Java(TM) SE Runtime Environment (build 19.0.2+7-44)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

I am interpreting it as Java version 19 is already installed in my PC.

Please guide me the missing part because of which firebase gives the error for java version.


Solution

  • seems there is a duplicate question here.

    firebase-tools is referring to the version of the JDK installed, not the version of Java runtime installed.

    please have a look at this.