Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Akka with Eclipse

I am trying to get a simple Akka program building with Eclipse and Scala. I used g8 to create the sbt project with Akka(g8 typesafehub/akka-scala-sbt) and then sbteclispe to create the Eclipse project. When I import the project into Eclipse I'm given errors saying I am missing Akka. Is there any way that I can build an Akka project with Eclipse?

like image 299
sublixt Avatar asked Sep 27 '12 00:09

sublixt


People also ask

Can Akka be used with Java?

Akka is a toolkit and runtime for building highly concurrent, distributed, and fault-tolerant event-driven applications on the JVM. Akka can be used with both Java and Scala. This guide introduces Akka Actors by describing the Java version of the Hello World example.

What is alternative to Akka?

Spring, Scala, Erlang, Kafka, and Spring Boot are the most popular alternatives and competitors to Akka.

Is Akka only for Scala?

Akka is a toolkit for building highly concurrent, distributed, and resilient message-driven applications for Java and Scala.

Is Akka a good framework?

Akka is a very scalable piece of software, not only in the context of performance but also in the size of applications it is useful for. The core of Akka, akka-actor, is very small and easily dropped into an existing project where you need asynchronicity and lockless concurrency without hassle.


1 Answers

The simplest thing is to add the sbteclipse plugin to your Sbt build. It automatically generates project files for Eclipse, so that you can import your project with all its settings, classpath included. To do so, add the following under project/plugins.sbt (not in the root of your project, but under the project subdirectory):

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

then, start sbt and at the prompt write eclipse. You should see:

> eclipse
[info] About to create Eclipse project files for your project(s).
[info] Successfully created Eclipse project files for project(s):
[info] Test Project

Then go to Eclipse and Import your project.

like image 58
Iulian Dragos Avatar answered Sep 22 '22 16:09

Iulian Dragos