src/jdk.jcmd/linux/classes/sun/tools/ProcessHelper.java
author dtitov
Thu, 13 Jun 2019 11:21:50 -0700
changeset 55386 2f4e214781a1
parent 54460 6733a9176cce
permissions -rw-r--r--
8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process Reviewed-by: sspitsyn, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     1
/*
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     2
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     4
 *
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    10
 *
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    15
 * accompanied this code).
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    16
 *
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    20
 *
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    23
 * questions.
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    24
 */
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    25
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    26
package sun.tools;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    27
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    28
import java.io.IOException;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    29
import java.io.UncheckedIOException;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    30
import java.nio.file.Files;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    31
import java.nio.file.Paths;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    32
import java.util.jar.Attributes;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    33
import java.util.jar.JarFile;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    34
import java.util.stream.Stream;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    35
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    36
/**
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    37
 * A helper class that retrieves the main class name for
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    38
 * a running Java process using the proc filesystem (procfs)
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    39
 */
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    40
public class ProcessHelper implements sun.tools.common.ProcessHelper {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    41
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    42
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    43
    private static final String CMD_PREFIX = "cmd:";
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    44
    private static final ProcessHelper INSTANCE = new ProcessHelper();
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    45
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    46
    public static ProcessHelper getInstance() {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    47
        return INSTANCE;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    48
    }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    49
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    50
    /**
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    51
     * Gets the main class name for the given Java process by parsing the
54460
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    52
     * process command line. If the application was started with the <em>-jar</em>
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    53
     * option this method returns the name of the jar file. If the application
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    54
     * was started with <em>-m</em> or <em>--module</em> option, the method returns
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    55
     * the module name and the main class name.
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    56
     * @param pid - process ID (pid)
54460
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    57
     * @return the main class name or null if the process no longer exists or
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    58
     * was started with a native launcher (e.g. jcmd etc)
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    59
     */
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    60
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    61
    public String getMainClass(String pid) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    62
        String cmdLine = getCommandLine(pid);
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    63
        if (cmdLine == null) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    64
            return null;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    65
        }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    66
        if (cmdLine.startsWith(CMD_PREFIX)) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    67
            cmdLine = cmdLine.substring(CMD_PREFIX.length());
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    68
        }
55386
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
    69
        String[] parts = cmdLine.split("\0");
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    70
        String mainClass = null;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    71
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    72
        if(parts.length == 0) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    73
            return null;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    74
        }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    75
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    76
        // Check the executable
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    77
        String[] executablePath = parts[0].split("/");
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    78
        if (executablePath.length > 0) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    79
            String binaryName = executablePath[executablePath.length - 1];
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    80
            if (!"java".equals(binaryName)) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    81
                // Skip the process if it is not started with java launcher
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    82
                return null;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    83
            }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    84
        }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    85
54460
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    86
        // To be consistent with the behavior on other platforms, if -jar, -m, or --module
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    87
        // options are used then just return the value (the path to the jar file or module
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    88
        // name with a main class). Otherwise, the main class name is the first part that
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    89
        // is not a Java option (doesn't start with '-' and is not a classpath or a module
55386
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
    90
        // whitespace option).
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    91
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    92
        for (int i = 1; i < parts.length && mainClass == null; i++) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    93
            if (i < parts.length - 1) {
54460
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    94
                if (parts[i].equals("-m") || parts[i].equals("--module") || parts[i].equals("-jar")) {
6733a9176cce 8221730: jcmd process name matching broken
dtitov
parents: 53707
diff changeset
    95
                    return parts[i + 1];
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    96
                }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
    97
            }
55386
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
    98
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
    99
            if (parts[i].startsWith("--module=")) {
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   100
                return parts[i].substring("--module=".length());
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   101
            }
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   102
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   103
            // If this is a classpath or a module whitespace option then skip the next part
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   104
            // (the classpath or the option value itself)
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   105
            if (parts[i].equals("-cp") || parts[i].equals("-classpath") ||  parts[i].equals("--class-path") ||
55386
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   106
                    isModuleWhiteSpaceOption(parts[i])) {
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   107
                i++;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   108
                continue;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   109
            }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   110
            // Skip all other Java options
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   111
            if (parts[i].startsWith("-")) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   112
                continue;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   113
            }
55386
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   114
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   115
            // If it is a source-file mode then return null
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   116
            if (parts[i].endsWith(".java")) {
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   117
                return null;
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   118
            }
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   119
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   120
            mainClass = parts[i];
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   121
        }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   122
        return mainClass;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   123
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   124
    }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   125
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   126
    private static String getCommandLine(String pid) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   127
        try (Stream<String> lines =
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   128
                     Files.lines(Paths.get("/proc/" + pid + "/cmdline"))) {
55386
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   129
            return lines.findFirst().orElse(null);
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   130
        } catch (IOException | UncheckedIOException e) {
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   131
            return null;
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   132
        }
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   133
    }
55386
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   134
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   135
    private static boolean isModuleWhiteSpaceOption(String option) {
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   136
        return option.equals("-p") ||
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   137
                option.equals("--module-path") ||
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   138
                option.equals("--upgrade-module-path") ||
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   139
                option.equals("--add-modules") ||
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   140
                option.equals("--limit-modules") ||
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   141
                option.equals("--add-exports") ||
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   142
                option.equals("--add-opens") ||
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   143
                option.equals("--add-reads") ||
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   144
                option.equals("--patch-module");
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   145
    }
2f4e214781a1 8225543: Jcmd fails to attach to the Java process on Linux using the main class name if whitespace options were used to launch the process
dtitov
parents: 54460
diff changeset
   146
53707
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   147
}
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   148
67537bbafd7f 8205654: serviceability/dcmd/framework/HelpTest.java timed out
dtitov
parents:
diff changeset
   149