本文整理汇总了Java中com.sun.jdi.connect.LaunchingConnector类的典型用法代码示例。如果您正苦于以下问题:Java LaunchingConnector类的具体用法?Java LaunchingConnector怎么用?Java LaunchingConnector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LaunchingConnector类属于com.sun.jdi.connect包,在下文中一共展示了LaunchingConnector类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: connectorArguments
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
/**
* 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;
}
示例2: 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;
}
示例3: connectorArguments
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
/**
* 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;
}
示例4: LaunchingDICookie
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
private LaunchingDICookie (
LaunchingConnector launchingConnector,
Map<String, ? extends Argument> args,
String mainClassName,
boolean suspend
) {
this.launchingConnector = launchingConnector;
this.args = args;
this.mainClassName = mainClassName;
this.suspend = suspend;
}
示例5: findLaunchingConnector
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
private static LaunchingConnector findLaunchingConnector () {
Iterator<LaunchingConnector> iter = Bootstrap.virtualMachineManager ().
launchingConnectors ().iterator ();
while (iter.hasNext ()) {
LaunchingConnector lc = iter.next ();
if (lc.name ().indexOf ("RawCommandLineLaunch") > -1)
return lc;
}
return null;
}
示例6: ChildSession
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
public ChildSession(ExecutionManager runtime,
LaunchingConnector connector,
Map<String, Connector.Argument> arguments,
InputListener input,
OutputListener output,
OutputListener error,
OutputListener diagnostics) {
this(runtime, generalGetVM(diagnostics, connector, arguments),
input, output, error, diagnostics);
}
示例7: getVM
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
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);
}
示例8: findLaunchingConnector
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
/**
* Find a com.sun.jdi.CommandLineLaunch connector
*/
static LaunchingConnector findLaunchingConnector() {
List <Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();
Iterator <Connector> iter = connectors.iterator();
while (iter.hasNext()) {
Connector connector = iter.next();
if (connector.name().equals("com.sun.jdi.CommandLineLaunch")) {
return (LaunchingConnector)connector;
}
}
throw new Error("No launching connector");
}
示例9: findLaunchingConnector
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
/**
* Find a com.sun.jdi.CommandLineLaunch connector
*/
static LaunchingConnector findLaunchingConnector() {
List <Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();
Iterator <Connector> iter = connectors.iterator();
while (iter.hasNext()) {
Connector connector = iter.next();
if (connector.name().equals("com.sun.jdi.CommandLineLaunch")) {
return (LaunchingConnector)connector;
}
}
throw new Error("No launching connector");
}
示例10: launchTarget
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
private VirtualMachine launchTarget() {
LaunchingConnector launcher = (LaunchingConnector) connector;
try {
VirtualMachine new_vm = timedVirtualMachineCreation(() -> launcher.launch(connectorArgs), null);
process = new_vm.process();
return new_vm;
} catch (Throwable ex) {
throw reportLaunchFail(ex, "launch");
}
}
示例11: launchingConnectors
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
@Override
public List<LaunchingConnector> launchingConnectors() {
List<LaunchingConnector> connectors = new ArrayList<>();
connectors.add(new AdvancedLaunchingConnector(this));
connectors.addAll(super.launchingConnectors());
return connectors;
}
示例12: makePlatformConnector
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
private static LaunchingConnector makePlatformConnector() {
Class connectorClass = null;
try {
connectorClass = Class.forName(RAW_COMMANDLINE_LAUNCHER);
} catch (ClassNotFoundException cnfe) {
}
if (connectorClass == null) {
throw new RuntimeException("can not load class: " + RAW_COMMANDLINE_LAUNCHER);
}
try {
return (LaunchingConnector) connectorClass.newInstance();
} catch (Exception exp) {
throw new RuntimeException(exp);
}
}
示例13: makePlatformConnector
import com.sun.jdi.connect.LaunchingConnector; //导入依赖的package包/类
private static LaunchingConnector makePlatformConnector() {
Class connectorClass = null;
try {
connectorClass = Class.forName(SUN_COMMANDLINE_LAUNCHER);
} catch (ClassNotFoundException cnfe) {
}
if (connectorClass == null) {
throw new RuntimeException("can not load class: " + SUN_COMMANDLINE_LAUNCHER);
}
try {
return (LaunchingConnector) connectorClass.newInstance();
} catch (Exception exp) {
throw new RuntimeException(exp);
}
}