Exception in thread “main” java.lang.NumberFormatException: Not a version: 9

狂风中的少年 提交于 2020-01-23 02:28:05

问题


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 ?


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!