Import scala.io.StdIn

I use Eclipse ScalaIDE and for some reason I cannot

import scala.io.StdIn

I get a red squiggly that tells me:

the stdIn object is not a member of the io package

And I see that it is not in this scala.io jar file. ScalaDoc, however, says he should be there. I tried both scala 2.10.4 and 2.11.5. I used Eclipse ScalaIDE to create a scala project, and I also created the sbt eclipse project directly, using scalasbt.pluginwhich I always use to manage ScalaIDE dependencies.

sbt "eclipse with-source=true"

None of the methods get it.

I am currently taking a Coursera reactive programming course, and this assignment file has this import. I can compile the project directly with sbt, but Eclipse ScalaIDE does not do this work. Any clues? There may be good reasons not to use it scala.io.StdIn, but my question is: why can't I import it into ScalaIDE?

Thank you

+4
source share
1 answer

scala.io.StdIn is new in scala 2.11.x and does not exist in previous versions.

, , , , , ScalaIDE scala, . , 2.10.4, , , -, , .

+6

All Articles