Is the Actka Actors library installed with the Scala IDE for Scala 2.10?

I recently started to learn Scala and started by installing the Scala IDE in my copy of Eclipse (Indigo). First I installed the Scala IDE for Scala 2.9, but then I noticed that there is a newer version for Scala 2.10. Installing a new plugin on top of the old one seemed to work, but ...

Scala 2.10 abandoned older Scala actors in favor of the Ackers. Thus, I am trying to add import to a Scala toy:

import akka.actor.Actor 

This is flagged in the IDE with an error

 not found: object akka 

When I look at my Scala project properties, I really don't see any of the akka- * jar files mentioned in the Akka documentation.

Do I need to download and install them separately, even if the Scala IDE plugin has installed the rest of Scala 2.10? Or have package names been changed as part of Akka actor integration instead of the old Scala Actors? (The documentation does not say this, but the release of Scala 2.10 is quite recent ...)

+6
source share
3 answers

Akka artifacts are not related to the Scala IDE (for now), you will have to add "akka-actor_2.10" and friends depending on your projects.

+4
source

No, they are not packaged together.

The easiest way to make sure that the Eclipse IDE can see your dependencies (Akka and everything that is specified in the build.sbt file) is to let sbt do this using the sbteclipse plugin. Here are the instructions I wrote for the staff:


Install the sbteclipse plugin

This plugin will allow sbt to add files / links that Eclipse should find for all the dependencies specified in the build.sbt file. Otherwise, you can use the IDE, but you will look for all kinds of errors "object not found".

Just make sure the plugin is added to your global plugins.sbt file. This file (and its path) may not exist, so you may need to create it in the following location:

 ~/.sbt $ cd ~/.sbt/0.13/ ~/.sbt/0.13 $ mkdir plugins 

Edit / create plugins.sbt file:

 ~/.sbt/0.13 $ vi plugins/plugins.sbt 

then add this line (it could be the only line in the file):

 addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0") 

Running sbteclipse

To use this, you simply go to the scala project on the command line and run the following. If you already have Eclipse open, start it and restart.

 /sites/ewuser (master)$ sbt eclipse 

References:

+5
source

Download akka to eclipse from the underlying location

http://downloads.typesafe.com/akka/akka_2.11-2.4.1.zip?_ga=1.167921254.618585520.1450199987

extract zip

add dependencies from the lib folder to the project

0
source

All Articles