code: public Result compile(String[] args) {
          Context context = new Context();
          JavacFileManager.preRegister(context); // can't create it until Log has been set up
          Result result = compile(args, context);
          if (fileManager instanceof JavacFileManager) {
              try {
                  // A fresh context was created above, so jfm must be a JavacFileManager
                  ((JavacFileManager)fileManager).close();
              } catch (IOException ex) {
                  bugMessage(ex);
              }
          }
          return result;
      }
docs: Programmatic interface for main function.
  @param args  the command line parameters
  @return the result of the compilation