Scala 标准库中的演员吗?
Are actors in Scala standard library?
我对 scala 中当前版本的 Actors 需要 Akka 感到困惑。
当我看到:https://en.wikipedia.org/wiki/Akka_(toolkit)
我从 "Akka is written in Scala and, as of Scala 2.10, Akka's actor implementation is included as part of the Scala standard library.[3]"
行了解到 Akka 包含在 scala 库中
然而,当我尝试使用这个 Ping Pong 示例时:http://alvinalexander.com/scala/scala-akka-actors-ping-pong-simple-example 我遇到依赖性错误。下面是具体的:
Error:scalac: missing or invalid dependency detected while loading class file 'ActorSystem.class'.
Could not access term typesafe in package com,
because it (or its dependencies) are missing. Check your build definition for
missing or conflicting dependencies. (Re-run with -Ylog-classpath
to see the problematic classpath.)
A full rebuild may help if 'ActorSystem.class' was compiled against an incompatible version of com.
当我在 IntelliJ 中调出我的全局 scala 库时,我可以看到我的默认 scala 安装中有 akka 罐子
- C:\Program Files (x86)\scala\lib\akka-actor_2.11-2.3.10.jar
- C:\Program Files (x86)\scala\lib\scala-actors-2.11.0.jar
etc
其他消息来源声称我需要下载 Akka 库,但目前我无法选择。我的代码只需要在当前默认的 scala 构建上 运行。如果需要,我会放弃使用 Akka。
Akka Actors 在 Scala 标准库中不可用。
标准库中可用的演员称为 Scala 演员。
Akka actors 被社区积极开发和使用。所以使用 Akka actors 而不是 Scala Actors
您可能仍需要包含类路径 - 在它们刚刚安装的那一刻,您需要告诉 java 应该在哪里使用它们
java-类路径"C:\Program Files (x86)\scala\lib\akka-actor_2.11-2.3.10.jar"
我对 scala 中当前版本的 Actors 需要 Akka 感到困惑。
当我看到:https://en.wikipedia.org/wiki/Akka_(toolkit) 我从 "Akka is written in Scala and, as of Scala 2.10, Akka's actor implementation is included as part of the Scala standard library.[3]"
行了解到 Akka 包含在 scala 库中然而,当我尝试使用这个 Ping Pong 示例时:http://alvinalexander.com/scala/scala-akka-actors-ping-pong-simple-example 我遇到依赖性错误。下面是具体的:
Error:scalac: missing or invalid dependency detected while loading class file 'ActorSystem.class'. Could not access term typesafe in package com, because it (or its dependencies) are missing. Check your build definition for missing or conflicting dependencies. (Re-run with
-Ylog-classpath
to see the problematic classpath.) A full rebuild may help if 'ActorSystem.class' was compiled against an incompatible version of com.
当我在 IntelliJ 中调出我的全局 scala 库时,我可以看到我的默认 scala 安装中有 akka 罐子
- C:\Program Files (x86)\scala\lib\akka-actor_2.11-2.3.10.jar
- C:\Program Files (x86)\scala\lib\scala-actors-2.11.0.jar etc
其他消息来源声称我需要下载 Akka 库,但目前我无法选择。我的代码只需要在当前默认的 scala 构建上 运行。如果需要,我会放弃使用 Akka。
Akka Actors 在 Scala 标准库中不可用。
标准库中可用的演员称为 Scala 演员。
Akka actors 被社区积极开发和使用。所以使用 Akka actors 而不是 Scala Actors
您可能仍需要包含类路径 - 在它们刚刚安装的那一刻,您需要告诉 java 应该在哪里使用它们
java-类路径"C:\Program Files (x86)\scala\lib\akka-actor_2.11-2.3.10.jar"