How can I use Akka Actors in a Java application?

后端 未结 4 1782
我寻月下人不归
我寻月下人不归 2021-01-13 06:51

I would like to use Akka actors in Java.

I downloaded the akka-1.0.zip and added akka-actor-1.0.jar to my \"Build Path\" in Eclipse.

<
相关标签:
4条回答
  • 2021-01-13 07:42

    I see this problem using Akka in a Java project in Eclipse with the Scala IDE installed. The problem goes away when using an Eclipse instance without the Scala IDE installed. Eclipse is perhaps confused by two Scala libraries around?

    0 讨论(0)
  • 2021-01-13 07:45

    You can find a complete, working example here; it's a Maven project, so it will get the dependencies for you automatically.

    0 讨论(0)
  • 2021-01-13 07:45

    I don't know Akka actors but it seems you need some scala support (libs on the build path) as well.

    0 讨论(0)
  • 2021-01-13 07:47

    In your akka-1.0.zip file there is scala-library.jar. Try adding it to the build path.

    Also, there is a lib_managed directory inside the zip, which contains further library files. Possibly aslo some of them will be needed.

    To avoid this kind of situations you should try maven. There is a Akka repository: http://scalablesolutions.se/akka/repository/se/scalablesolutions/akka/

    0 讨论(0)
提交回复
热议问题