Scala returns "error while loading package, Missing dependency 'object java.lang.Object in compiler mirror'"

2.5k Views Asked by At

I am new to Scala, just installed IJ (intelliJIDEA 2017.2.4 version) but while after creating project getting below error:

  SBT 'Gettingstarted' project refresh failed
  Error:Error:Error while importing SBT project:<br/>...<br/><pre>at
  sbt.MainLoop$.runWithNewLog(MainLoop.scala:63) at 
  sbt.MainLoop$.runAndClearLast(MainLoop.scala:46) at 
  sbt.MainLoop$.runLoggedLoop(MainLoop.scala:30) at 
  sbt.MainLoop$.runLogged(MainLoop.scala:22) at 
  sbt.StandardMain$.runManaged(Main.scala:109) at 
  sbt.xMain.run(Main.scala:38) 
  at 
 xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109) at 
 xsbt.boot.Launch$.withContextLoader(Launch.scala:128) at 
 xsbt.boot.Launch$.run(Launch.scala:109) at 
 xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35) at 
 xsbt.boot.Launch$.launch(Launch.scala:117) at 
 xsbt.boot.Launch$.apply(Launch.scala:18) at 
 xsbt.boot.Boot$.runImpl(Boot.scala:41) at 
 xsbt.boot.Boot$.main(Boot.scala:17) 
 at 
 xsbt.boot.Boot.main(Boot.scala) [error] 
 scala.reflect.internal.MissingRequirementError: object java.lang.Object in 
 compiler mirror not found. [error] Use 'last' for the full log. > > error: 
 error
 while loading package, Missing dependency 'object java.lang.Object in 
 compiler 
 mirror', required by C:\Users\Dell\.sbt\boot\scala-2.10.6\lib\scala-
 library.jar(scala/runtime/package.class)</pre><br/>See complete log in <a 

 href="file:/C:/Users/Dell/.IdeaIC2017.2/system/log/sbt.last.log">
 file:/C:/Use/
Dell/.IdeaIC2017.2/system/log/sbt.last.log</a>

Here are the versions of software I am using:

  • Java version 9
  • SBT :1.0.2
  • Scala :2.11.11

What can I try to resolve this?

1

There are 1 best solutions below

0
illusionx On

Currently JAVA 9 isn't fully supported by Scala / Play framework. So better stick to version 1.8.0_xxx