My code is:
import org.apache.spark.SparkContext
It can run in interactive mode, but when I use scalac to compile it, I got the following error message:
object apache is not a member of package org
This seems to be the problem of path, but I do not know exactly how to configure the path.
You need to specify the path of libraries used when compiling your Scala code. This is usually not done manually, but using a build tool such as Maven or sbt. You can find a minimal sbt setup at http://spark.apache.org/docs/1.2.0/quick-start.html#self-contained-applications
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With