Java Code Examples for com.sun.jdi.connect.LaunchingConnector#defaultArguments()

The following examples show how to use com.sun.jdi.connect.LaunchingConnector#defaultArguments() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FieldMonitor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
  * Return the launching connector's arguments.
  */
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
     Map<String,Connector.Argument> arguments = connector.defaultArguments();
     for (String key : arguments.keySet()) {
       System.out.println(key);
     }

     Connector.Argument mainArg = (Connector.Argument)arguments.get("main");
     if (mainArg == null) {
         throw new Error("Bad launching connector");
     }
     mainArg.setValue(mainArgs);

     Connector.Argument optionsArg = (Connector.Argument)arguments.get("options");
     if (optionsArg == null) {
       throw new Error("Bad launching connector");
     }
     optionsArg.setValue(ARGUMENTS);
     return arguments;
 }
 
Example 2
Source File: FieldMonitor.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
  * Return the launching connector's arguments.
  */
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
     Map<String,Connector.Argument> arguments = connector.defaultArguments();
     for (String key : arguments.keySet()) {
       System.out.println(key);
     }

     Connector.Argument mainArg = (Connector.Argument)arguments.get("main");
     if (mainArg == null) {
         throw new Error("Bad launching connector");
     }
     mainArg.setValue(mainArgs);

     Connector.Argument optionsArg = (Connector.Argument)arguments.get("options");
     if (optionsArg == null) {
       throw new Error("Bad launching connector");
     }
     optionsArg.setValue(ARGUMENTS);
     return arguments;
 }
 
Example 3
Source File: FieldMonitor.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
  * Return the launching connector's arguments.
  */
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
     Map<String,Connector.Argument> arguments = connector.defaultArguments();
     for (String key : arguments.keySet()) {
       System.out.println(key);
     }

     Connector.Argument mainArg = (Connector.Argument)arguments.get("main");
     if (mainArg == null) {
         throw new Error("Bad launching connector");
     }
     mainArg.setValue(mainArgs);

     Connector.Argument optionsArg = (Connector.Argument)arguments.get("options");
     if (optionsArg == null) {
       throw new Error("Bad launching connector");
     }
     optionsArg.setValue(ARGUMENTS);
     return arguments;
 }
 
Example 4
Source File: FieldMonitor.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
  * Return the launching connector's arguments.
  */
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
     Map<String,Connector.Argument> arguments = connector.defaultArguments();
     for (String key : arguments.keySet()) {
       System.out.println(key);
     }

     Connector.Argument mainArg = (Connector.Argument)arguments.get("main");
     if (mainArg == null) {
         throw new Error("Bad launching connector");
     }
     mainArg.setValue(mainArgs);

     Connector.Argument optionsArg = (Connector.Argument)arguments.get("options");
     if (optionsArg == null) {
       throw new Error("Bad launching connector");
     }
     optionsArg.setValue(ARGUMENTS);
     return arguments;
 }
 
Example 5
Source File: GetObjectLockCount.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the launching connector's arguments.
 */
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
    Map<String,Connector.Argument> arguments = connector.defaultArguments();

    Connector.Argument mainArg = (Connector.Argument)arguments.get("main");
    if (mainArg == null) {
        throw new Error("Bad launching connector");
    }
    mainArg.setValue(mainArgs);

    Connector.Argument optionsArg = (Connector.Argument)arguments.get("options");
    if (optionsArg == null) {
        throw new Error("Bad launching connector");
    }
    optionsArg.setValue(ARGUMENTS);
    return arguments;
}
 
Example 6
Source File: FieldMonitor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
  * Return the launching connector's arguments.
  */
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
     Map<String,Connector.Argument> arguments = connector.defaultArguments();
     for (String key : arguments.keySet()) {
       System.out.println(key);
     }

     Connector.Argument mainArg = (Connector.Argument)arguments.get("main");
     if (mainArg == null) {
         throw new Error("Bad launching connector");
     }
     mainArg.setValue(mainArgs);

     Connector.Argument optionsArg = (Connector.Argument)arguments.get("options");
     if (optionsArg == null) {
       throw new Error("Bad launching connector");
     }
     optionsArg.setValue(ARGUMENTS);
     return arguments;
 }
 
Example 7
Source File: FieldMonitor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
  * Return the launching connector's arguments.
  */
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
     Map<String,Connector.Argument> arguments = connector.defaultArguments();
     for (String key : arguments.keySet()) {
       System.out.println(key);
     }

     Connector.Argument mainArg = (Connector.Argument)arguments.get("main");
     if (mainArg == null) {
         throw new Error("Bad launching connector");
     }
     mainArg.setValue(mainArgs);

     Connector.Argument optionsArg = (Connector.Argument)arguments.get("options");
     if (optionsArg == null) {
       throw new Error("Bad launching connector");
     }
     optionsArg.setValue(ARGUMENTS);
     return arguments;
 }
 
Example 8
Source File: FieldMonitor.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
  * Return the launching connector's arguments.
  */
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
     Map<String,Connector.Argument> arguments = connector.defaultArguments();
     for (String key : arguments.keySet()) {
       System.out.println(key);
     }

     Connector.Argument mainArg = (Connector.Argument)arguments.get("main");
     if (mainArg == null) {
         throw new Error("Bad launching connector");
     }
     mainArg.setValue(mainArgs);

     Connector.Argument optionsArg = (Connector.Argument)arguments.get("options");
     if (optionsArg == null) {
       throw new Error("Bad launching connector");
     }
     optionsArg.setValue(ARGUMENTS);
     return arguments;
 }
 
Example 9
Source File: ChildSession.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 10
Source File: ChildSession.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 11
Source File: ChildSession.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 12
Source File: ChildSession.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 13
Source File: ChildSession.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 14
Source File: JDIExampleDebugger.java    From tutorials with MIT License 5 votes vote down vote up
/**
 * Sets the debug class as the main argument in the connector and launches the VM
 * @return VirtualMachine
 * @throws IOException
 * @throws IllegalConnectorArgumentsException
 * @throws VMStartException
 */
public VirtualMachine connectAndLaunchVM() throws IOException, IllegalConnectorArgumentsException, VMStartException {
    LaunchingConnector launchingConnector = Bootstrap.virtualMachineManager().defaultConnector();
    Map<String, Connector.Argument> arguments = launchingConnector.defaultArguments();
    arguments.get("main").setValue(debugClass.getName());
    VirtualMachine vm = launchingConnector.launch(arguments);
    return vm;
}
 
Example 15
Source File: ChildSession.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 16
Source File: ChildSession.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 17
Source File: ChildSession.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 18
Source File: ChildSession.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 19
Source File: ChildSession.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
static private VirtualMachine getVM(OutputListener diagnostics,
                                    String userVMArgs,
                                    String cmdLine) {
    VirtualMachineManager manager = Bootstrap.virtualMachineManager();
    LaunchingConnector connector = manager.defaultConnector();
    Map<String, Connector.Argument> arguments = connector.defaultArguments();
    arguments.get("options").setValue(userVMArgs);
    arguments.get("main").setValue(cmdLine);
    return generalGetVM(diagnostics, connector, arguments);
}
 
Example 20
Source File: DecisionProcedureGuidanceJDI.java    From jbse with GNU General Public License v3.0 5 votes vote down vote up
private Map<String, Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
    final Map<String, Connector.Argument> arguments = connector.defaultArguments();
    final Connector.Argument mainArg = arguments.get("main");
    if (mainArg == null) {
        throw new Error("Bad launching connector");
    }
    mainArg.setValue(mainArgs);
    return arguments;
}