geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r329563 - /geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java
Date Sun, 30 Oct 2005 13:38:57 GMT
Author: ammulder
Date: Sun Oct 30 05:38:53 2005
New Revision: 329563

URL: http://svn.apache.org/viewcvs?rev=329563&view=rev
Log:
A little teensy bit more user-friendly

Modified:
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java?rev=329563&r1=329562&r2=329563&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java
(original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java
Sun Oct 30 05:38:53 2005
@@ -30,6 +30,15 @@
      */
     public static void main(String[] args) {
         log.info("Client startup begun");
+        if(args.length == 0) {
+            System.out.println();
+            System.out.println("ERROR: No arguments");
+            showHelp();
+            System.exit(1);
+        } else if(args[0].equals("--help") || args[0].equals("-h") || args[0].equals("/?"))
{
+            showHelp();
+            System.exit(0);
+        }
         try {
             URI configuration = new URI(args[0]);
             String[] clientArgs = new String[args.length -1];
@@ -43,6 +52,18 @@
             System.exit(2);
             throw new AssertionError();
         }
+    }
+
+    private static void showHelp() {
+        System.out.println();
+        System.out.println("syntax:   java -jar bin/client.jar config-name [app arg] [app
arg] ...");
+        System.out.println();
+        System.out.println("The first argument should identify the Geronimo configuration
that");
+        System.out.println("contains the application client you want to run.");
+        System.out.println();
+        System.out.println("The rest of the arguments will be passed as arguments to the");
+        System.out.println("application client when it is started.");
+        System.out.println();
     }
 
 



Mime
View raw message