用Akka在Eclipse中构建Scala项目



我是Scala和Akka的新手,我只是试图用Scala IDE(4.1.0)和JDK8在Eclipse (Luna)中做一个示例教程项目。

  • 如果我创建一个简单的Hello World Scala应用程序,例如,它只做一个println,它构建,我可以右键单击并运行Scala应用程序,没有问题。
  • 然后我尝试Akka等效,它创建了一个问候并向某人问候Hello,我得到了这个奇怪的编译错误:

    Description Resource    Path    Location    Type  
    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.    akkatest2       Unknown Scala Problem
    

我已经将akka-actor (2.11) jar添加到属性下的构建路径中,这是我在网上找到的一个akka遍历,当我第一次进入该项目时,该项目已经包含了Scala库容器,因为该项目是作为Eclipse中的Scala项目创建的。

我在想,如果我只是错过了另一个阿卡罐,因为有一堆其他的,它会抱怨一些阿卡。*包。看起来它在找com。类型安全和失败,所以我不确定我还错过了什么。

面临同样的问题。将类型安全的配置jar添加到类路径和所有akka依赖项中。

在项目中包含config-1.2.1.jar(在我的系统上)文件。Config-1.2.1.jar有com.typesafe.config类

您应该将所有jar包含在Akka Folder中。甚至有些jar在当前项目中可能不需要,但是依赖关系使它们成为必要

最新更新