code: public void waitForExit()
      {
          synchronized (m_frameworkProcess) {
              try
              {
                  LOG.debug( "Waiting for framework exit." );
                  System.out.println();
                  m_frameworkProcess.waitFor();
                  shutdown();
              }
              catch( Throwable e )
              {
                  LOG.debug( "Early shutdown.", e );
                  shutdown();
              }
          }
      }
docs: Wait till the framework process exits.