< prev index next >

test/jdk/tools/launcher/VersionCheck.java

Print this page


   1 /*
   2  * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */


  45 
  46     // tools that do not accept -J-option
  47     static final String[] BLACKLIST_JOPTION = {
  48         "controlpanel",
  49         "jabswitch",
  50         "java-rmi",
  51         "java-rmi.cgi",
  52         "java",
  53         "javacpl",
  54         "jaccessinspector",
  55         "jaccessinspector-32",
  56         "jaccesswalker",
  57         "jaccesswalker-32",
  58         "jaotc",
  59         "javaw",
  60         "javaws",
  61         "jcontrol",
  62         "jmc",
  63         "jmc.ini",
  64         "jweblauncher",
  65         "packager",
  66         "ssvagent",
  67         "unpack200",
  68     };
  69 
  70     // tools that do not accept -version
  71     static final String[] BLACKLIST_VERSION = {
  72         "appletviewer",
  73         "controlpanel",
  74         "jaccessinspector",
  75         "jaccessinspector-32",
  76         "jaccesswalker",
  77         "jaccesswalker-32",
  78         "jaotc",
  79         "jar",
  80         "jarsigner",
  81         "java-rmi",
  82         "java-rmi.cgi",
  83         "javadoc",
  84         "javacpl",
  85         "javaws",


  91         "jfr",
  92         "jimage",
  93         "jinfo",
  94         "jlink",
  95         "jmap",
  96         "jmod",
  97         "jmc",
  98         "jmc.ini",
  99         "jps",
 100         "jrunscript",
 101         "jjs",
 102         "jstack",
 103         "jstat",
 104         "jstatd",
 105         "jweblauncher",
 106         "keytool",
 107         "kinit",
 108         "klist",
 109         "ktab",
 110         "pack200",
 111         "packager",
 112         "rmic",
 113         "rmid",
 114         "rmiregistry",
 115         "serialver",
 116         "servertool",
 117         "ssvagent",
 118         "unpack200"
 119     };
 120 
 121     // expected reference strings
 122     static String refVersion;
 123     static String refFullVersion;
 124 
 125     static String getAllVersionLines(String... argv) {
 126         return getVersion0(true, argv);
 127     }
 128 
 129     static String getVersion(String... argv) {
 130         return getVersion0(false, argv);
 131     }


   1 /*
   2  * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */


  45 
  46     // tools that do not accept -J-option
  47     static final String[] BLACKLIST_JOPTION = {
  48         "controlpanel",
  49         "jabswitch",
  50         "java-rmi",
  51         "java-rmi.cgi",
  52         "java",
  53         "javacpl",
  54         "jaccessinspector",
  55         "jaccessinspector-32",
  56         "jaccesswalker",
  57         "jaccesswalker-32",
  58         "jaotc",
  59         "javaw",
  60         "javaws",
  61         "jcontrol",
  62         "jmc",
  63         "jmc.ini",
  64         "jweblauncher",
  65         "jpackage",
  66         "ssvagent",
  67         "unpack200",
  68     };
  69 
  70     // tools that do not accept -version
  71     static final String[] BLACKLIST_VERSION = {
  72         "appletviewer",
  73         "controlpanel",
  74         "jaccessinspector",
  75         "jaccessinspector-32",
  76         "jaccesswalker",
  77         "jaccesswalker-32",
  78         "jaotc",
  79         "jar",
  80         "jarsigner",
  81         "java-rmi",
  82         "java-rmi.cgi",
  83         "javadoc",
  84         "javacpl",
  85         "javaws",


  91         "jfr",
  92         "jimage",
  93         "jinfo",
  94         "jlink",
  95         "jmap",
  96         "jmod",
  97         "jmc",
  98         "jmc.ini",
  99         "jps",
 100         "jrunscript",
 101         "jjs",
 102         "jstack",
 103         "jstat",
 104         "jstatd",
 105         "jweblauncher",
 106         "keytool",
 107         "kinit",
 108         "klist",
 109         "ktab",
 110         "pack200",
 111         "jpackage",
 112         "rmic",
 113         "rmid",
 114         "rmiregistry",
 115         "serialver",
 116         "servertool",
 117         "ssvagent",
 118         "unpack200"
 119     };
 120 
 121     // expected reference strings
 122     static String refVersion;
 123     static String refFullVersion;
 124 
 125     static String getAllVersionLines(String... argv) {
 126         return getVersion0(true, argv);
 127     }
 128 
 129     static String getVersion(String... argv) {
 130         return getVersion0(false, argv);
 131     }


< prev index next >