title: Akka - Deprecation Compile Errors
body: <p>I've decided to tackle Akka... which was going great until compile time :-/ Running Ubuntu by the way.</p>
  
  <p>What I've Done So Far:</p>
  
  <ol>
  <li>Installed JRE and JDK 7</li>
  <li>Downloaded/Extracted Akka</li>
  <li>Downloaded and Setup Maven</li>
  <li>Set up PATH variables etc</li>
  </ol>
  
  <p>All following this tutorial <a href="http://doc.akka.io/docs/akka/2.0.2/intro/getting-started-first-java.html" rel="nofollow noreferrer">Tutorial</a></p>
  
  <p>When compiling, I'm getting the following errors</p>
  
  <pre><code>javac -cp lib/scala-library.jar:lib/akka/akka-actor_2.10-2.2.1.jar akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java -Xlint:deprecation
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:8: warning: [deprecation] UntypedActorFactory in akka.actor has been deprecated
  import akka.actor.UntypedActorFactory;
                   ^
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:10: error: cannot find symbol
  import akka.util.Duration;
                  ^
    symbol:   class Duration
    location: package akka.util
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:56: error: cannot find symbol
      private final Duration duration;
                    ^
    symbol:   class Duration
    location: class PiApproximation
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:58: error: cannot find symbol
      public PiApproximation(double pi, Duration duration) {
                                        ^
    symbol:   class Duration
    location: class PiApproximation
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:67: error: cannot find symbol
      public Duration getDuration() {
             ^
    symbol:   class Duration
    location: class PiApproximation
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:112: warning: [deprecation] Props(Class&lt;? extends Actor&gt;) in Props has been deprecated
        workerRouter = this.getContext().actorOf(new Props(Worker.class).withRouter(new RoundRobinRouter(nrOfWorkers)),
                                                 ^
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:127: error: cannot find symbol
            Duration duration = Duration.create(System.currentTimeMillis() - start, TimeUnit.MILLISECONDS);
            ^
    symbol:   class Duration
    location: class Master
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:127: error: cannot find symbol
            Duration duration = Duration.create(System.currentTimeMillis() - start, TimeUnit.MILLISECONDS);
                                ^
    symbol:   variable Duration
    location: class Master
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:158: warning: [deprecation] Props(Class&lt;? extends Actor&gt;) in Props has been deprecated
      final ActorRef listener = system.actorOf(new Props(Listener.class), "listener");
                                               ^
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:161: warning: [deprecation] UntypedActorFactory in akka.actor has been deprecated
      ActorRef master = system.actorOf(new Props(new UntypedActorFactory() {
                                                     ^
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:161: warning: [deprecation] Props(UntypedActorFactory) in Props has been deprecated
      ActorRef master = system.actorOf(new Props(new UntypedActorFactory() {
                                       ^
  akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:168: error: method tell in class ActorRef cannot be applied to given types;
      master.tell(new Calculate());
            ^
    required: Object,ActorRef&lt;br/&gt;
    found: Calculate&lt;br/&gt;
    reason: actual and formal argument lists differ in length&lt;br/&gt;
  7 errors&lt;br/&gt;
  5 warnings
  </code></pre>
  
  <p>I've literally copied ans pasted their final Pi.java file and tried to compile and i'm completely at a loss as how to proceed? :-(</p>
  
  <p>Any ideas would be great.</p>