 -      } catch (ClassNotFoundException $e) {
 -        self::$err->writeLine('*** ', $e->getMessage());
 -        return 1;
--      }
++      
++      // Check whether class is runnable
++      if (!$class->isSubclassOf('lang.Runnable')) {
++          self::$err->writeLine('*** ', $class->getName(), ' is not runnable');
++          return 1;
+       }
  
        // Usage
-       if ($classparams->exists('help', '?')) {
-@@ -255,13 +279,13 @@
+@@ -255,13 +317,13 @@
            try {
              $method->invoke($instance, array($pass));
            } catch (Throwable $e) {

Index: util/cmd/Runner.class.php
===================================================================
--- util/cmd/Runner.class.php	(revision 10875)
+++ util/cmd/Runner.class.php	(working copy)
@@ -56,7 +56,7 @@
         '#<pre>#', '#</pre>#', '#<li>#',
       ), array(

     }
     
     /**
@@ -72,12 +72,13 @@
         self::$err->writeLine(str_repeat('=', 72));
       }
 
+      $extra= $details= $positional= array();
       foreach ($class->getMethods() as $method) {
         if (!$method->hasAnnotation('arg')) continue;
 
         $arg= $method->getAnnotation('arg');
         $name= strtolower(preg_replace('/^set/', '', $method->getName()));;
