src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java
changeset 48543 7067fe4e054e
parent 47216 71c04702a3d5
child 52902 e3398b2e1ab0
equal deleted inserted replaced
48542:19effb7970bc 48543:7067fe4e054e
     1 /*
     1 /*
     2  * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 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
   120                         // do not allow empty property name
   120                         // do not allow empty property name
   121                         usage(EXIT_CMD_NO_PROPNAME);
   121                         usage(EXIT_CMD_NO_PROPNAME);
   122                     }
   122                     }
   123                 }
   123                 }
   124                 continue;
   124                 continue;
   125             } else if (arg.equals("-?") || arg.equals("-help")) {
   125             } else if (arg.equals("-?") ||
       
   126                        arg.equals("-h") ||
       
   127                        arg.equals("--help") ||
       
   128                        // -help: legacy.
       
   129                        arg.equals("-help")) {
   126                 usage(EXIT_SUCCESS);
   130                 usage(EXIT_SUCCESS);
   127             } else if (arg.equals("-e")) {
   131             } else if (arg.equals("-e")) {
   128                 seenScript = true;
   132                 seenScript = true;
   129                 if (++i == args.length)
   133                 if (++i == args.length)
   130                     usage(EXIT_CMD_NO_SCRIPT);
   134                     usage(EXIT_CMD_NO_SCRIPT);