Package com.sun.jdi

Examples of com.sun.jdi.VirtualMachine


     *
     * @param jdwp
     * @throws Exception
     */
    public void resume(Map jdwp) throws Exception {
        VirtualMachine vm = connect(jdwp);
        if (vm != null) {
            vm.resume();
            vm.dispose();
        }
    }
View Full Code Here


     *
     * @param jdwp
     * @throws Exception
     */
    public void info(Map jdwp) throws Exception {
        VirtualMachine vm = connect(jdwp);
        if (vm != null) {
            System.out.println("java.vm.name = " + vm.name());
            System.out.println("java.version = " + vm.version());
            System.out.println(vm.description());
            vm.resume();
            vm.dispose();
        }
    }
View Full Code Here

     * @param jdwp
     * @throws Exception
     */
    public void hotswap(Map jdwp) throws Exception {
        // @todo check it works at runtime not suspended
        VirtualMachine vm = ClassLoaderPatcher.hotswapClassLoader(
                System.getProperty(
                        ProcessStarter.CL_PRE_PROCESSOR_CLASSNAME_PROPERTY,
                        org.codehaus.aspectwerkz.hook.impl.ClassLoaderPreProcessorImpl.class.getName()
                ), (String) jdwp
                            .get(TRANSPORT_JDWP), (String) jdwp.get(ADDRESS_JDWP)
        );
        if (vm != null) {
            vm.resume();
            vm.dispose();
        }
    }
View Full Code Here

                secondsToWait = Integer.parseInt(System.getProperty(CONNECTION_WAIT_PROPERTY, "0"));
            }
            catch (NumberFormatException nfe) {
                ;
            }
            VirtualMachine vm = ClassLoaderPatcher.hotswapClassLoader(
                    clp, starter.getTransport(), starter.getAddress(), secondsToWait
            );
            if (vm == null) {
                process.destroy();
            }
            else {
                vm.resume();
                vm.dispose();
            }
        }

        // attach VM other streams to this streams
        redirectOtherStreams();
View Full Code Here

                    ;
                }
            }
            // loop 10 times, during 5 sec max. It appears some VM under Linux take time to accept connections
            // this avoid to specifically set -Daspectwerkz.classloader.wait
            VirtualMachine vm = null;
            ConnectException vmConnectionRefused = new ConnectException("should not appear as is");
            for (int retry = 0; retry < 10; retry++) {
                try {
                    vm = connector.attach(args);
                    break;
View Full Code Here

        else if ("dt_shmem".equals(transport)) {
            ((Connector.Argument)args.get("name")).setValue(address);
        }

        try {
            VirtualMachine vm = connector.attach(args);
            return vm;
        }
        catch (IllegalConnectorArgumentsException e) {
            System.err.println("failed to attach to VM (" + transport + ", " + address + "):");
            e.printStackTrace();
View Full Code Here

     *
     * @param jdwp
     * @throws Exception
     */
    public void resume(Map jdwp) throws Exception {
        VirtualMachine vm = connect(jdwp);
        if (vm != null) {
            vm.resume();
            vm.dispose();
        }
    }
View Full Code Here

     *
     * @param jdwp
     * @throws Exception
     */
    public void info(Map jdwp) throws Exception {
        VirtualMachine vm = connect(jdwp);
        if (vm != null) {
            System.out.println("java.vm.name = " + vm.name());
            System.out.println("java.version = " + vm.version());
            System.out.println(vm.description());
            vm.resume();
            vm.dispose();
        }
    }
View Full Code Here

     * @param jdwp
     * @throws Exception
     */
    public void hotswap(Map jdwp) throws Exception {
        // @todo check it works at runtime not suspended
        VirtualMachine vm = ClassLoaderPatcher.hotswapClassLoader(
                System.getProperty(
                        ProcessStarter.CL_PRE_PROCESSOR_CLASSNAME_PROPERTY,
                        org.codehaus.aspectwerkz.hook.impl.ClassLoaderPreProcessorImpl.class.getName()
                ),
                (String)jdwp.get(TRANSPORT_JDWP),
                (String)jdwp.get(ADDRESS_JDWP)
        );
        if (vm != null) {
            vm.resume();
            vm.dispose();
        }
    }
View Full Code Here

    }
    registerRequest(target.createClassPrepareRequest(classPrepareTypeName),
        target);

    // create breakpoint requests for each class currently loaded
    VirtualMachine vm = target.getVM();
    if (vm != null) {
      List<ReferenceType> classes = vm.allClasses();
      if (classes != null) {
        String typeName = null;
        for(ReferenceType type : classes) {
          typeName = type.name();
          if (typeName != null && typeName.startsWith(referenceTypeName)) {
View Full Code Here

TOP

Related Classes of com.sun.jdi.VirtualMachine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.