You can check the version of Java you have installed by using the following command at a command-line prompt:
java --version
We need version 9 or later.
Also, the installed version must be a JDK. The JRE will not suffice. You can download the latest Java version at www.oracle.com/technetwork/java. At the time of writing this book, version 10 was generally available so I installed that version, as you can see from the following screenshot: