protected VirtualMachineManagerImpl()

in src/main/java/com/jetbrains/jdi/VirtualMachineManagerImpl.java [84:134]


    protected VirtualMachineManagerImpl() {
        if (TEST) {
            System.err.println("Initializing JB VirtualMachineManager");
        }

        /*
         * Create a top-level thread group
         */
        ThreadGroup top = Thread.currentThread().getThreadGroup();
        ThreadGroup parent;
        while ((parent = top.getParent()) != null) {
            top = parent;
        }
        mainGroupForJDI = new ThreadGroup(top, "JDI main");


        /*
         * Create the connectors
         */
        addConnector(new SunCommandLineLauncher());
        addConnector(new RawCommandLineLauncher());
        addConnector(new SocketAttachingConnector());
        addConnector(new SocketListeningConnector());
        addConnector(new ProcessAttachingConnector());
        if (isWindows()) {
            try {
                addConnector(new SharedMemoryListeningConnector());
                addConnector(new SharedMemoryAttachingConnector());
            } catch (ReflectiveOperationException | InaccessibleObjectException x) {
                x.printStackTrace();
            }
        }

        // Set the default launcher. In order to be compatible
        // 1.2/1.3/1.4 we try to make the default launcher
        // "com.sun.jdi.CommandLineLaunch". If this connector
        // isn't found then we arbitarly pick the first connector.
        //
        boolean found = false;
        List<LaunchingConnector> launchers = launchingConnectors();
        for (LaunchingConnector lc: launchers) {
            if (lc.name().equals(connectorName("com.jetbrains.jdi.CommandLineLaunch"))) {
                setDefaultConnector(lc);
                found = true;
                break;
            }
        }
        if (!found && launchers.size() > 0) {
            setDefaultConnector(launchers.get(0));
        }
    }