I am trying to run a Spark maven Scala Project in eclipse .
when i run the scala class , i get this error :
Exception in thread "main" java.lang.NumberFormatException: Not a version: 9
at scala.util.PropertiesTrait$class.parts$1(Properties.scala:184)
at scala.util.PropertiesTrait$class.isJavaAtLeast(Properties.scala:187)
at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
....
what is wrong ? what is a version 9 ?
Scala does not work with Java 9 out of the box just yet - there is a way, but you have to be sure that various components in your mix have minimal versions required for compatibility.
See this compatibility matrix (notice Java, Scala and SBT versions)
and this issue for more details.
The easiest fix is to run your Spark project in Eclipse using Java 8.
来源:https://stackoverflow.com/questions/51398331/exception-in-thread-main-java-lang-numberformatexception-not-a-version-9