Are you sure you downloaded the JDK (Java Development Kit), not the JRE (Java Runtime Environment) ??
Because the java
executable that Windows has found still appears to be a JRE java rather than a JDK java, as suggested by the error message.
On my machine I have both both a JDK and JRE installed:
C:\Program Files\Java\jdk1.8.0_131
C:\Program Files\Java\jre1.8.0_131
So you may have something similar.
If you DON'T have a jdk folder there, then maybe you only got the JRE.
If you DO have the jdk folder, what you need to do is make sure that the java under the JDK is the one that is used for the install.
To do that, you do it with the PATH environmental variable, and make sure the path to the JDK happens before the path to the JRE.
setting up enviromental variables in windows 10 to use java and javac
Remember to include the bin
in the path.
It's probably also worth setting the JAVA_HOME variable while you're setting environment variables - this should point to the root of your JDK install (that is, the same thing, but with out bin
on the end).
You'll also need to make sure you open a new command shell. Changes made to environment variables aren't immediately available within cmd
windows that were already open. So close that one and start a new one.