Check Java Version on MacOS

Go to System Preference > Java > Update > Update Now. Turn on “Check for Updates Automatically”.

Java Control Panel