_blank" title="Go to snippet source"></a><code class="language-scala">val system: ActorSystem[Ping.Command] = ActorSystem(Ping(), &quot;helloworld&quot;)
system ! Ping.Start
system.terminate()</code></pre>
<p>运行示例程序，可看到如何输出：</p>
<pre class="prettyprint"><code class="language-sbtshell">sbt:akka-cookbook&gt; cookbook-actor/runMain cookbook.actor.introduction.HelloWorld
[info] running (fork) cookbook.actor.introduction.HelloWorld 
[2019-11-19 19:24:39,285] [INFO] [akka.event.slf4j