当前位置: 首页>>代码示例>>Java>>正文


Java LaunchingConnector.defaultArguments方法代码示例

本文整理汇总了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;
 }
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:23,代码来源:FieldMonitor.java

示例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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:GetObjectLockCount.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:ChildSession.java

示例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 );
       }
}
 
开发者ID:robertocapuano,项目名称:jink,代码行数:32,代码来源:Session.java

示例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;
}
 
开发者ID:adrianherrera,项目名称:jdivisitor,代码行数:17,代码来源:LocalVMLauncher.java

示例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;
}
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:44,代码来源:Tracer.java


注:本文中的com.sun.jdi.connect.LaunchingConnector.defaultArguments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。