Package org.jostraca.util

Examples of org.jostraca.util.ExecutableCommand.execute()


      String fullcmd = cmd.getFullCmd();

      cmd.setUserMessageHandler( iUserMessageHandler );
      cmd.setActivityDescription( UserText.get( UserText.TXT_compiling ) );

      boolean successful = cmd.execute
        ( new ExecutableCommand.AlternativeExecutableCommands
          (
           // try jikes if javac not found and vice versa
           new ExecutableCommand( JavaUtil.COMPILER_javac.equals( compiler ) ? JavaUtil.COMPILER_jikes : JavaUtil.COMPILER_javac,
                                  compilerOpts, sourceFiles )
View Full Code Here


           // try to use JAVA_HOME
           ,new ExecutableCommand( "JAVA_HOME/"+JavaUtil.COMPILER_javac, compilerOpts, sourceFiles ) {
               public boolean execute( ExecutableCommand pParent ) {
                 ExecutableCommand jhc = new ExecutableCommand( "cmd", "/c echo %JAVA_HOME%" );
                 if( jhc.execute( new ExecutableCommand.AlternativeExecutableCommands
                   ( new ExecutableCommand( "sh", "-c \"echo $JAVA_HOME\"" ) ) ) ) {
                   String javaHome = jhc.getOutResult().trim();
                   if( !Standard.EMPTY.equals( javaHome ) ) {
                     iCmdPrefix = javaHome + File.separator + "bin" + File.separator + JavaUtil.COMPILER_javac;
                     return execute();
View Full Code Here

      String fullcmd = cmd.getFullCmd();

      cmd.setUserMessageHandler( iUserMessageHandler );
      cmd.setActivityDescription( UserText.get( UserText.TXT_compiling ) );

      successful = cmd.execute();

      if( !successful ) {
        if( cmd.hasErrResult() ) {
          throw ProcessException.CODE_compile_errors( cmd.getExecutedCmd() + Standard.NEWLINE
                                                       + cmd.getOutResult() + Standard.NEWLINE
View Full Code Here

    ExecutableCommand ec = new ExecutableCommand( "badcmd", args );
    final RecordingUserMessageHandler rumh = new RecordingUserMessageHandler();

    ec.setUserMessageHandler( rumh );
    ec.setActivityDescription("Activity:");
    boolean outcome = ec.execute( new ExecutableCommand.AlternativeExecutableCommands
      (
       new ExecutableCommand( "badcmd2", args ),
       new ExecutableCommand( "", args ) {
           public boolean execute( ExecutableCommand pParent ) {
             iCmdPrefix = "badcmd3";
View Full Code Here

         },
       new ExecutableCommand() {
           public boolean execute( ExecutableCommand pParent ) {
             ExecutableCommand sec = new ExecutableCommand( "subcmd1", "r", "s", this );
             sec.setUserMessageHandler( rumh );
             return sec.execute( new ExecutableCommand.AlternativeExecutableCommands
               (
                new ExecutableCommand( "subcmd2", sec.getCmdRoot(), sec.getCmdSuffix() ),
                new ExecutableCommand( "subcmd3", sec.getCmdRoot(), sec.getCmdSuffix() ),
                new ExecutableCommand( "cmd",     pParent.getCmdRoot() )
                ) );
View Full Code Here

      String fullcmd = cmd.getFullCmd();

      cmd.setUserMessageHandler( mUserMessageHandler );
      cmd.setActivityDescription( UserText.get( UserText.TXT_compiling ) );

      boolean successful = cmd.execute();
      /*
        ( new ExecutableCommand.AlternativeExecutableCommands
          (
           // try jikes if javac not found and vice versa
           new ExecutableCommand( JavaUtil.COMPILER_javac.equals( compiler ) ? JavaUtil.COMPILER_jikes : JavaUtil.COMPILER_javac,
View Full Code Here

      String fullcmd = cmd.getFullCmd();

      cmd.setUserMessageHandler( mUserMessageHandler );
      cmd.setActivityDescription( UserText.get( UserText.TXT_compiling ) );

      successful = cmd.execute();

      if( !successful ) {
        if( cmd.hasErrResult() ) {
          throw ProcessException.CODE_compile_errors( cmd.getExecutedCmd() + Standard.NEWLINE
                                                       + cmd.getOutResult() + Standard.NEWLINE
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.