예제 #1
0
  void start(
      String bootclasspath,
      String classpath,
      String[] classes,
      boolean all,
      FileOutputStream stream,
      String debugFile,
      boolean bigEndian,
      int debug,
      int options,
      boolean verbose)
      throws FileNotFoundException, TinyVMException {
    FileOutputStream debugStream = null;
    try {
      if (debugFile != null) debugStream = new FileOutputStream(debugFile);

      CLIToolProgressMonitor pm = new CLIToolProgressMonitor();
      pm.setVerbose(verbose);

      TinyVMTool tinyVM = new TinyVMTool();
      tinyVM.addProgressMonitor(pm);

      tinyVM.link(
          joinCP(bootclasspath, classpath),
          classes,
          all,
          stream,
          bigEndian,
          options,
          debug,
          debugStream);
    } finally {
      if (debugStream != null) {
        try {
          debugStream.close();
        } catch (IOException e) {
          // ignore
        }
      }
    }
  }
예제 #2
0
 /**
  * Register log listener
  *
  * @param listener
  */
 public void addProgressMonitor(ToolProgressMonitor monitor) {
   fTinyVM.addProgressMonitor(monitor);
 }