Package com.sun.enterprise.universal.process

Examples of com.sun.enterprise.universal.process.ProcessManager.execute()


        ProcessManager pm = new ProcessManager(fullcommand);
        pm.setStdinLines(stdinLines);

        // XXX should not need this after fix for 12777, but we seem to
        pm.waitForReaderThreads(waitForReaderThreads);
        pm.execute()// blocks until command is complete

        String stdout = pm.getStdout();
        String stderr = pm.getStderr();

        if (output != null) {
View Full Code Here


        else
            pm.setEcho(false);
        int exit;

        try {
            exit = pm.execute();           
        }
        catch (ProcessManagerException ex) {
            logger.fine("Error while executing ssh-keygen: " + ex.getMessage());
            exit = 1;
        }
View Full Code Here

            if (verbose)
                cmds.add("--verbose");

            ProcessManager pm = new ProcessManager(cmds);
            pm.execute();

            int ret = pm.getExitValue();

            if (verbose || ret != 0)
                logger.info(pm.getStdout() + pm.getStderr());
View Full Code Here

            StringBuilder sb = new StringBuilder();
            if (!isUserSmfAuthorized(me, sb))
                throw new RuntimeException(Strings.get("noSmfAuth", me, sb.toString()));
            ProcessManager pm = new ProcessManager(SVCADM, "disable", info.serviceName);
            pm.setEcho(false);
            pm.execute();
            pm = new ProcessManager(SVCCFG, "delete", info.serviceName);
            pm.setEcho(false);
            pm.execute();
        }
        catch (RuntimeException re) {
View Full Code Here

            ProcessManager pm = new ProcessManager(SVCADM, "disable", info.serviceName);
            pm.setEcho(false);
            pm.execute();
            pm = new ProcessManager(SVCCFG, "delete", info.serviceName);
            pm.setEcho(false);
            pm.execute();
        }
        catch (RuntimeException re) {
            throw re;
        }
        catch (Exception ex) {
View Full Code Here

            pm.setEcho(true);
        else
            pm.setEcho(false);

        try {
            exit = pm.execute();
        }
        catch (ProcessManagerException ex) {
            if (logger.isLoggable(Level.FINE)) {
                logger.fine("Error while executing command: " + ex.getMessage());
            }
View Full Code Here

    private void createLink(File link, String[] cmds) {
        try {
            ProcessManager mgr = new ProcessManager(cmds);
            mgr.setEcho(false);
            mgr.execute();
            trace("Create Link Output: " + mgr.getStdout() + mgr.getStderr());
            link.setExecutable(true, false);
            trace("Created link file: " + link);
        }
        catch (ProcessManagerException e) {
View Full Code Here

            StringBuilder sb = new StringBuilder();
            if (!isUserSmfAuthorized(me, sb))
                throw new RuntimeException(Strings.get("noSmfAuth", me, sb.toString()));
            ProcessManager pm = new ProcessManager(SVCADM, "disable", info.serviceName);
            pm.setEcho(false);
            pm.execute();
            pm = new ProcessManager(SVCCFG, "delete", info.serviceName);
            pm.setEcho(false);
            pm.execute();
        }
        catch (RuntimeException re) {
View Full Code Here

            ProcessManager pm = new ProcessManager(SVCADM, "disable", info.serviceName);
            pm.setEcho(false);
            pm.execute();
            pm = new ProcessManager(SVCCFG, "delete", info.serviceName);
            pm.setEcho(false);
            pm.execute();
        }
        catch (RuntimeException re) {
            throw re;
        }
        catch (Exception ex) {
View Full Code Here

            if (!targetWin32Exe.canExecute())
                throw new RuntimeException(Strings.get("cant_exec"));

            ProcessManager pm = new ProcessManager(targetWin32Exe.getAbsolutePath(), "stop");
            pm.setEcho(false);
            pm.execute();

            pm = new ProcessManager(targetWin32Exe.getAbsolutePath(), "uninstall");
            pm.setEcho(false);
            pm.execute();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.