src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java
changeset 48543 7067fe4e054e
parent 47216 71c04702a3d5
child 52006 82dc590fa586
equal deleted inserted replaced
48542:19effb7970bc 48543:7067fe4e054e
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   789     }
   789     }
   790 
   790 
   791     private static void usage() {
   791     private static void usage() {
   792         MessageOutput.println("zz usage text", new Object [] {progname,
   792         MessageOutput.println("zz usage text", new Object [] {progname,
   793                                                      File.pathSeparator});
   793                                                      File.pathSeparator});
   794         System.exit(1);
   794         System.exit(0);
   795     }
   795     }
   796 
   796 
   797     static void usageError(String messageKey) {
   797     static void usageError(String messageKey) {
   798         MessageOutput.println(messageKey);
   798         MessageOutput.println(messageKey);
   799         MessageOutput.println();
   799         MessageOutput.println();
  1005                 if (i == (argv.length - 1)) {
  1005                 if (i == (argv.length - 1)) {
  1006                     usageError("No connect specification.");
  1006                     usageError("No connect specification.");
  1007                     return;
  1007                     return;
  1008                 }
  1008                 }
  1009                 connectSpec = argv[++i];
  1009                 connectSpec = argv[++i];
  1010             } else if (token.equals("-help")) {
  1010             } else if (token.equals("-?") ||
       
  1011                        token.equals("-h") ||
       
  1012                        token.equals("--help") ||
       
  1013                        // -help: legacy.
       
  1014                        token.equals("-help")) {
  1011                 usage();
  1015                 usage();
  1012             } else if (token.equals("-version")) {
  1016             } else if (token.equals("-version")) {
  1013                 Commands evaluator = new Commands();
  1017                 Commands evaluator = new Commands();
  1014                 evaluator.commandVersion(progname,
  1018                 evaluator.commandVersion(progname,
  1015                                          Bootstrap.virtualMachineManager());
  1019                                          Bootstrap.virtualMachineManager());