本文整理汇总了Java中com.sun.jdi.connect.LaunchingConnector.launch方法的典型用法代码示例。如果您正苦于以下问题:Java LaunchingConnector.launch方法的具体用法?Java LaunchingConnector.launch怎么用?Java LaunchingConnector.launch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jdi.connect.LaunchingConnector
的用法示例。
在下文中一共展示了LaunchingConnector.launch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generalGetVM
import com.sun.jdi.connect.LaunchingConnector; //导入方法依赖的package包/类
static private VirtualMachine generalGetVM(OutputListener diagnostics,
LaunchingConnector connector,
Map<String, Connector.Argument> arguments) {
VirtualMachine vm = null;
try {
diagnostics.putString("Starting child.");
vm = connector.launch(arguments);
} catch (IOException ioe) {
diagnostics.putString("Unable to start child: " + ioe.getMessage());
} catch (IllegalConnectorArgumentsException icae) {
diagnostics.putString("Unable to start child: " + icae.getMessage());
} catch (VMStartException vmse) {
diagnostics.putString("Unable to start child: " + vmse.getMessage() + '\n');
dumpFailedLaunchInfo(diagnostics, vmse.process());
}
return vm;
}
示例2: spawn
import com.sun.jdi.connect.LaunchingConnector; //导入方法依赖的package包/类
private VirtualMachine spawn( String vmArgs, String cmdLine ) throws SessionException
{
VirtualMachine vm;
try
{
VirtualMachineManager manager = Bootstrap.virtualMachineManager();
LaunchingConnector connector = manager.defaultConnector();
Map arguments = connector.defaultArguments();
DC.log(LEVEL, arguments );
((Connector.Argument)arguments.get("options")).setValue(vmArgs);
((Connector.Argument)arguments.get("main")).setValue(cmdLine);
vm = connector.launch( arguments );
return vm;
}
catch (IOException ioe)
{
throw new SessionException( ioe );
}
catch (IllegalConnectorArgumentsException icae )
{
throw new SessionException( icae );
}
catch (VMStartException vmse )
{
throw new SessionException( vmse );
}
}
示例3: connect
import com.sun.jdi.connect.LaunchingConnector; //导入方法依赖的package包/类
@Override
public VirtualMachine connect() throws Exception {
List<LaunchingConnector> connectors = Bootstrap.virtualMachineManager()
.launchingConnectors();
LaunchingConnector connector = findConnector(
"com.sun.jdi.CommandLineLaunch", connectors);
Map<String, Connector.Argument> arguments = connectorArguments(connector);
VirtualMachine vm = connector.launch(arguments);
redirectOutput(vm);
return vm;
}