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


Java LaunchingConnector类代码示例

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

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

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

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:LaunchingDICookie.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:LaunchingDICookie.java

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

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

示例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");
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:15,代码来源:FieldMonitor.java

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

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

示例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;
}
 
开发者ID:Microsoft,项目名称:java-debug,代码行数:8,代码来源:AdvancedVirtualMachineManager.java

示例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);
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:16,代码来源:F3RawLaunchingConnector.java

示例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);
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:16,代码来源:F3LaunchingConnector.java


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