public void compileAndRun ( ) throws Exception { synchronized ( this . monitor ) { try { stop ( ) ; Class < ? > [ ] compiledSources = compile ( ) ; monitorForChanges ( ) ; // Run in new thread to ensure that the context classloader is setup this . runThread = new RunThread ( compiledSources ) ; this . runThread . start ( ) ; this . runThread . join ( ) ; } catch ( Exception ex ) { if ( this . fileWatchThread == null ) { throw ex ; } else { ex . printStackTrace ( ) ; } } } }
Compile and run the application .