igx
igx

Reputation: 4231

Repl showing error: object async is not a member of package scala on import

I am using scala 2.11.7 Repl (ubuntu) when trying to do this import I am getting :

scala> import scala.async.Async._ 
<console>:18: error: object async is not a member of package scala
       import scala.async.Async._
                    ^

how can I fix that ?

Upvotes: 0

Views: 541

Answers (2)

mfirry
mfirry

Reputation: 3692

scala-async is not part of Scala standard library. You need to import the module in your project.

If you use sbt, you can add the following to your build file.

libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.5"

Check out this PR about the lack of information about this.

Hope this helps!

Upvotes: 1

Johny T Koshy
Johny T Koshy

Reputation: 3887

Use the following command to load the jar into classpath,

scala -classpath jarname.jar

Upvotes: 0

Related Questions