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 ; }
Programmatic interface for main function .