Firebase Java error

when i run firebase emulators:start it gives me this error

Firestore Emulator has exited because java is not installed, you can install it from https://openjdk.java.net/install/,
   stopping all running emulators

Hey there,

this error seems very helpful to me.
It also says how you can solve it.

i solved it can you tell me how can i solve the other problem them you commented on the Unhandled Rejection firebase error.