public static List getServerProcessCommand()

in core/src/main/java/com/jetbrains/sa/SaJdwp.java [66:90]


    public static List<String> getServerProcessCommand(Properties systemProperties, String target, String port, boolean server, String pathToJar) throws Exception {
        String javaHome = systemProperties.getProperty("java.home");
        String version = systemProperties.getProperty("java.specification.version");

        List<String> commands = new ArrayList<String>();
        if (version.startsWith("1.6") || version.startsWith("1.7") || version.startsWith("1.8")) {
            prepare6(commands, javaHome, pathToJar);
        } else {
            try {
                int v = Integer.parseInt(version);
                if (v >= 9) {
                    prepare9(commands, javaHome, pathToJar);
                }
            } catch (NumberFormatException ignored) {
            }
        }

        if (commands.isEmpty()) {
            throw new IllegalStateException("Unable to start on version " + version);
        }

        String serverClassName = server ? SaJdwpListeningServer.class.getName() : SaJdwpAttachingServer.class.getName();
        Collections.addAll(commands, serverClassName, target, port);
        return commands;
    }