title: Get command line arguments when running an Akka Microkernel?
body: <p>I have the <a href="http://doc.akka.io/docs/akka/2.1.0/scala/microkernel.html" rel="nofollow">Akka microkernel</a> below:</p>
  
  <pre><code>class ServiceKernel extends Bootable {
  
    val system = ActorSystem("service-kernel")
  
    def startup = {
      system.actorOf(Props(new Boot(false))) ! Start
    }
  
    def shutdown = {
      system.shutdown()
    }
  }
  </code></pre>
  
  <p>Because the kernel extends <code>Bootable</code> and not <code>App</code>, how would I access command line arguments used when starting the kernel? For instance if I run the kernel using <code>start namespace.ServiceKernel -d rundevmode</code> or similar. Thanks!</p>
  
  <h2>Additional Info</h2>
  
  <p>I thought it would be worth adding this information about the start up script in the microkernel. In <code>/bin/start</code> you notice the following:</p>
  
  <pre><code>#!/bin/sh
  
  AKKA_HOME="$(cd "$(cd "$(dirname "$0")"; pwd -P)"/..; pwd)"
  AKKA_CLASSPATH="$AKKA_HOME/config:$AKKA_HOME/lib/*"
  JAVA_OPTS="-Xms256M -Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2"
  
  java $JAVA_OPTS -cp "$AKKA_CLASSPATH" -Dakka.home="$AKKA_HOME" akka.kernel.Main "$@"
  </code></pre>
  
  <p>Although om-nom-nom originally suggested <code>-D</code> options, it looks like it's in use and the main start up parameter is being passed to the <code>akka.kernel.Main</code> class (which in this case would be the <code>ServiceKernel</code> class above).</p>