In my case, I had a similar problem. I had to fix a couple of things.
1- The JAVA_HOME check is true in both places;


2- Then I had to change the following lines in the spark-2.1.1-bin-hadoop2.7 \ bin folder .

- Add extra quotes around "% RUNNER%". So it will look like "% RUNNER%" "
- Then follow. \ spark-shell.cmd again.

source share