public void start ( ) { try { InputStream is = new ClassPathResource ( resourcePath , InstrumentationApplication . class . getClassLoader ( ) ) . getInputStream ( ) ; File tmpConfig = new File ( resourcePath ) ; if ( ! tmpConfig . getParentFile ( ) . exists ( ) ) tmpConfig . getParentFile ( ) . mkdirs ( ) ; BufferedOutputStream bos = new BufferedOutputStream ( new FileOutputStream ( tmpConfig ) ) ; IOUtils . copy ( is , bos ) ; bos . flush ( ) ; run ( new String [ ] { "server" , tmpConfig . getAbsolutePath ( ) } ) ; tmpConfig . deleteOnExit ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Start the server