public boolean doCompile(){
  BatchEnvironment env=getEnv();
  env.flags|=flags;
  env.majorVersion=45;
  env.minorVersion=3;
  String noMemoryErrorString=getText("rmic.no.memory");
  String stackOverflowErrorString=getText("rmic.stack.overflow");
  try {
    for (int i=classes.size() - 1; i >= 0; i--) {
      Identifier implClassName=Identifier.lookup(classes.elementAt(i));
      implClassName=env.resolvePackageQualifiedName(implClassName);
      implClassName=Names.mangleClass(implClassName);
      ClassDeclaration decl=env.getClassDeclaration(implClassName);
      try {
        ClassDefinition def=decl.getClassDefinition(env);
        for (int j=0; j < generators.size(); j++) {
          Generator gen=generators.elementAt(j);
          gen.generate(env,def,destDir);
        }
      }
 catch (      ClassNotFound ex) {
        env.error(0,"rmic.class.not.found",implClassName);
      }
    }
    if (!nocompile) {
      compileAllClasses(env);
    }
  }
 catch (  OutOfMemoryError ee) {
    env.output(noMemoryErrorString);
    return false;
  }
catch (  StackOverflowError ee) {
    env.output(stackOverflowErrorString);
    return false;
  }
catch (  Error ee) {
    if (env.nerrors == 0 || env.dump()) {
      env.error(0,"fatal.error");
      ee.printStackTrace(out instanceof PrintStream ? (PrintStream)out : new PrintStream(out,true));
    }
  }
catch (  Exception ee) {
    if (env.nerrors == 0 || env.dump()) {
      env.error(0,"fatal.exception");
      ee.printStackTrace(out instanceof PrintStream ? (PrintStream)out : new PrintStream(out,true));
    }
  }
  env.flushErrors();
  boolean status=true;
  if (env.nerrors > 0) {
    String msg="";
    if (env.nerrors > 1) {
      msg=getText("rmic.errors",env.nerrors);
    }
 else {
      msg=getText("rmic.1error");
    }
    if (env.nwarnings > 0) {
      if (env.nwarnings > 1) {
        msg+=", " + getText("rmic.warnings",env.nwarnings);
      }
 else {
        msg+=", " + getText("rmic.1warning");
      }
    }
    output(msg);
    status=false;
  }
 else {
    if (env.nwarnings > 0) {
      if (env.nwarnings > 1) {
        output(getText("rmic.warnings",env.nwarnings));
      }
 else {
        output(getText("rmic.1warning"));
      }
    }
  }
  if (!keepGenerated) {
    env.deleteGeneratedFiles();
  }
  if (env.verbose()) {
    tm=System.currentTimeMillis() - tm;
    output(getText("rmic.done_in",Long.toString(tm)));
  }
  env.shutdown();
  sourcePathArg=null;
  sysClassPathArg=null;
  extDirsArg=null;
  classPathString=null;
  destDir=null;
  classes=null;
  generatorArgs=null;
  generators=null;
  environmentClass=null;
  program=null;
  out=null;
  return status;
}

public boolean doCompile ( ) { BatchEnvironment env = getEnv ( ) ; env . flags |= flags ; env . majorVersion = 45 ; env . minorVersion = 3 ; String noMemoryErrorString = getText ( "rmic.no.memory" ) ; String stackOverflowErrorString = getText ( "rmic.stack.overflow" ) ; try { for ( int i = classes . size ( ) - 1 ; i >= 0 ; i -- ) { Identifier implClassName = Identifier . lookup ( classes . elementAt ( i ) ) ; implClassName = env . resolvePackageQualifiedName ( implClassName ) ; implClassName = Names . mangleClass ( implClassName ) ; ClassDeclaration decl = env . getClassDeclaration ( implClassName ) ; try { ClassDefinition def = decl . getClassDefinition ( env ) ; for ( int j = 0 ; j < generators . size ( ) ; j ++ ) { Generator gen = generators . elementAt ( j ) ; gen . generate ( env , def , destDir ) ; } } catch ( ClassNotFound ex ) { env . error ( 0 , "rmic.class.not.found" , implClassName ) ; } } if ( ! nocompile ) { compileAllClasses ( env ) ; } } catch ( OutOfMemoryError ee ) { env . output ( noMemoryErrorString ) ; return false ; } catch ( StackOverflowError ee ) { env . output ( stackOverflowErrorString ) ; return false ; } catch ( Error ee ) { if ( env . nerrors == 0 || env . dump ( ) ) { env . error ( 0 , "fatal.error" ) ; ee . printStackTrace ( out instanceof PrintStream ? ( PrintStream ) out : new PrintStream ( out , true ) ) ; } } catch ( Exception ee ) { if ( env . nerrors == 0 || env . dump ( ) ) { env . error ( 0 , "fatal.exception" ) ; ee . printStackTrace ( out instanceof PrintStream ? ( PrintStream ) out : new PrintStream ( out , true ) ) ; } } env . flushErrors ( ) ; boolean status = true ; if ( env . nerrors > 0 ) { String msg = "" ; if ( env . nerrors > 1 ) { msg = getText ( "rmic.errors" , env . nerrors ) ; } else { msg = getText ( "rmic.1error" ) ; } if ( env . nwarnings > 0 ) { if ( env . nwarnings > 1 ) { msg += ", " + getText ( "rmic.warnings" , env . nwarnings ) ; } else { msg += ", " + getText ( "rmic.1warning" ) ; } } output ( msg ) ; status = false ; } else { if ( env . nwarnings > 0 ) { if ( env . nwarnings > 1 ) { output ( getText ( "rmic.warnings" , env . nwarnings ) ) ; } else { output ( getText ( "rmic.1warning" ) ) ; } } } if ( ! keepGenerated ) { env . deleteGeneratedFiles ( ) ; } if ( env . verbose ( ) ) { tm = System . currentTimeMillis ( ) - tm ; output ( getText ( "rmic.done_in" , Long . toString ( tm ) ) ) ; } env . shutdown ( ) ; sourcePathArg = null ; sysClassPathArg = null ; extDirsArg = null ; classPathString = null ; destDir = null ; classes = null ; generatorArgs = null ; generators = null ; environmentClass = null ; program = null ; out = null ; return status ; }
do the compile with the switches and files already supplied
