scalac编译收益率与QUOT;对象Apache不包组织和QUOT中的一员; [英] scalac compile yields "object apache is not a member of package org"

查看:245
本文介绍了scalac编译收益率与QUOT;对象Apache不包组织和QUOT中的一员;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的code是:

import org.apache.spark.SparkContext

它可以在交互模式下运行,但是当我使用scalac编译它,我得到了以下错误消息:

It can run in interactive mode, but when I use scalac to compile it, I got the following error message:

对象Apache不包的成员组织

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.

推荐答案

您需要指定编译斯卡拉code时使用的库的路径。这通常不是手工完成,但使用的是构建工具如Maven的或SBT。你可以找到以最低的SBT设置<一个href=\"http://spark.apache.org/docs/1.2.0/quick-start.html#self-contained-applications\">http://spark.apache.org/docs/1.2.0/quick-start.html#self-contained-applications

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

这篇关于scalac编译收益率与QUOT;对象Apache不包组织和QUOT中的一员;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆