本文整理汇总了Java中com.sun.jdi.connect.LaunchingConnector.defaultArguments方法的典型用法代码示例。如果您正苦于以下问题:Java LaunchingConnector.defaultArguments方法的具体用法?Java LaunchingConnector.defaultArguments怎么用?Java LaunchingConnector.defaultArguments使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jdi.connect.LaunchingConnector
的用法示例。
在下文中一共展示了LaunchingConnector.defaultArguments方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
示例3: 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);
}
示例4: 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 );
}
}
示例5: connectorArguments
import com.sun.jdi.connect.LaunchingConnector; //导入方法依赖的package包/类
/**
* Set the launching connector's arguments.
*
* @param connector A launching connector
* @return The launching connector's arguments
*/
private Map<String, Connector.Argument> connectorArguments(
LaunchingConnector connector) {
Map<String, Connector.Argument> arguments = connector
.defaultArguments();
arguments.get("main").setValue(mainClass);
arguments.get("options").setValue(options);
return arguments;
}
示例6: connectorArguments
import com.sun.jdi.connect.LaunchingConnector; //导入方法依赖的package包/类
/**
* Return the launching connector's arguments.
*/
Map<String, Connector.Argument> connectorArguments(LaunchingConnector connector, RunConfiguration config) {
Map<String, Connector.Argument> arguments = connector.defaultArguments();
Connector.Argument mainArg = (Connector.Argument) arguments.get("main");
Connector.Argument optionArg = (Connector.Argument) arguments
.get("options");
String options = "";
String main = "";
if (mainArg == null) {
throw new Error("Bad launching connector");
} else if (optionArg == null) {
throw new Error("Bad launching connector");
}
if (config.isJar()) {
main = "\"" + config.getMain() + "\"";
options = "-jar";
} else {
main = config.getMain();
String[] jars = config.getExternalJarPaths();
String external_jars = "";
for (int i = 0; i < jars.length; i++)
external_jars += jars[i] + "\\*;";
options = "-cp " + '"' + config.getClassPath()
+ FileUtilities.PATH_SEPARTATOR + external_jars + "\"";
}
String[] args = config.getArgs();
for (int i = 0; i < args.length; i++) {
main += " \"" + args[i] + "\"";
}
mainArg.setValue(main);
optionArg.setValue(options);
return arguments;
}