score:0

Accepted answer

Maybe the << does not add all the individual jars to the classpath? You might have to look for something else to include all jars in lib and lib/akka. Unfortunately I don't know enough JRuby to tell you how to do it.

Also: you are importing classes (ActorRegistry, Actors) that don't exist in Akka 2.3.8. Please check the latest API docs, and make sure you are not trying an Akka 1.x example (as ActorRegistry would indicate).

So, the following seems to work, maybe you can use that as a starting point:

require "java"

$CLASSPATH << "akka-2.3.8/lib/scala-library-2.11.4.jar"
$CLASSPATH << "akka-2.3.8/lib/akka/akka-actor_2.11-2.3.8.jar"
$CLASSPATH << "akka-2.3.8/lib/akka/config-1.2.1.jar"

java_import java.lang.System
java_import "akka.actor.ActorRef"
java_import "akka.actor.ActorSystem"
java_import "akka.actor.Props"
java_import "akka.actor.UntypedActor"

Related Query

More Query from same tag