Package helper

Examples of helper.ProcessHandler


                    // TODO: use a better Exception!!!
                    throw new ConvWatchCancelException/*WrongEnvironmentException*/("We doesn't work within windows environment.");
                }
               

                ProcessHandler aHandler = new ProcessHandler(aList);
                boolean bBackValue = aHandler.executeSynchronously();
            }
            catch (IndexOutOfBoundsException e)
            {
                throw new ConvWatchCancelException/*WrongEnvironmentException*/("Given list is too short.");
            }
View Full Code Here


    String executeSynchronously(String _sCommand)
        {
            // System.out.println(_sCommand);

            ProcessHandler aHandler = new ProcessHandler(_sCommand);
            boolean bBackValue = aHandler.executeSynchronously();

            String sText = aHandler.getOutputText();
           
            GlobalLogWriter.get().println("Exitcode: " + String.valueOf(aHandler.getExitCode()));
            return sText;
        }
View Full Code Here

            // } catch (Exception e) {
            //     System.out.println("FAILED");
            // }
            // System.out.println("done");
           
            ProcessHandler aHandler = new ProcessHandler(sCommandArray);
            boolean bBackValue = aHandler.executeSynchronously();

            // TODO: return a real filename, due to the fact we don't know how much files are created, maybe better to return a list

            ArrayList m_aFileList = new ArrayList();
            for (int i=1;i<9999;i++)
View Full Code Here

                    _sOldGfx,
                    _sNewGfx,
                    _sDiffGfx
                };
           
            ProcessHandler aHandler = new ProcessHandler(sCommandArray);
            boolean bBackValue = aHandler.executeSynchronously();

            String sBack = aHandler.getOutputText();
            GlobalLogWriter.get().println("'" + sBack + "'");

            // return aHandler.getExitCode();
            if (FileHelper.exists(_sDiffGfx))
            {
View Full Code Here

                    sIdentify,
                    "-format",
                    sIM_Format,
                    _sDiffGfx
                };
            ProcessHandler aHandler = new ProcessHandler(sCommandArray);
            boolean bBackValue = aHandler.executeSynchronously();
            String sBack = aHandler.getOutputText();
            GlobalLogWriter.get().println("'" + sBack + "'");

            // try to interpret the result, which we get as a String
            try
            {
View Full Code Here

                    // TODO: use a better Exception!!!
                    throw new WrongEnvironmentException("We doesn't work within windows environment.");
                }
               

                ProcessHandler aHandler = new ProcessHandler(aList);
                boolean bBackValue = aHandler.executeSynchronously();
            }
            catch (IndexOutOfBoundsException e)
            {
                throw new WrongEnvironmentException("Given list is too short.");
            }
View Full Code Here

            //     System.out.println("FAILED");
            // }
            // System.out.println("done");
           
// TODO: gives ghostscript an error we can handle?
            ProcessHandler aHandler = new ProcessHandler(sCommandArray);
            boolean bBackValue = aHandler.executeSynchronously();
            assure("There seems to be a problem with ghostscript", bBackValue, true);
            int nExitCode = aHandler.getExitCode();
            // ArrayList m_aFileList = new ArrayList();

            // String sJPEGNameSchema = "";
            if (nExitCode == 0)
            {
View Full Code Here

                    _sOldGfx,
                    _sNewGfx,
                    _sDiffGfx
                };
           
            ProcessHandler aHandler = new ProcessHandler(sCommandArray);
            boolean bBackValue = aHandler.executeSynchronously();
            int nExitCode = aHandler.getExitCode();
            if (nExitCode != 0)
            {
                GlobalLogWriter.println("'" + sComposite + "' return with ");
                String sBack = aHandler.getOutputText();
                GlobalLogWriter.get().println("'" + sBack + "'");
            }
            return nExitCode;
        }
View Full Code Here

                    sIdentify,
                    "-format",
                    sIM_Format,
                    _sDiffGfx
                };
            ProcessHandler aHandler = new ProcessHandler(sCommandArray);
            boolean bBackValue = aHandler.executeSynchronously();
            int nExitCode = aHandler.getExitCode();

            String sBack = aHandler.getOutputText();
            GlobalLogWriter.get().println("'" + sBack + "'");

            // try to interpret the result, which we get as a String
            try
            {
View Full Code Here

        final File fMakeFile = new File(sMakeFile);
        assure("ERROR: could not find makefile: '" + sMakeFile + "'", fMakeFile.exists(), mContinue);

        final String[] commands = getCommands(sUnoapi);

        final ProcessHandler procHdl = bet.runCommandsInEnvironmentShell(commands, fUnoapi, 0);
        log.println("exit code of dmake: " + procHdl.getExitCode());
        String test = procHdl.getOutputText();
        test = procHdl.getErrorText();
//        if (mDebug) {
//            log.println("---> Output of dmake:");
//            log.println(procHdl.getOutputText());
//            log.println("<--- Output of dmake:");
//            log.println("---> Error output of dmake:");
//            log.println(procHdl.getErrorText());
//            log.println("<--- Error output of dmake:");
//        }
        assure("module '" + module + "' failed", verifyOutput(procHdl.getOutputText()), mContinue);
        log.println(utils.getDateTime() + " module '" + module + "': kill existing office...");
        try {
            officeProvider.closeExistingOffice(param, true);
        } catch (java.lang.UnsatisfiedLinkError exception) {
            log.println("Office seems not to be running");
View Full Code Here

TOP

Related Classes of helper.ProcessHandler

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.