Does anyone have any one have any other reasons why I keep getting the error?
Current Apache Spark versions don’t support Java 9 or later. The support for these (or later versions) is planned for 3.0 release.
For the time being to run Spark you’ll have to use JDK 8.
Source: