private static void justRun ( String [ ] args ) { List < String > javacArgs = new ArrayList <> ( Arrays . asList ( args ) ) ; String nullawayJar = getJarFileForClass ( NullAway . class ) . getFile ( ) ; // add NullAway jar to existing processor path if found boolean foundProcessorPath = false ; for ( int i = 0 ; i < javacArgs . size ( ) ; i ++ ) { if ( javacArgs . get ( i ) . equals ( "-processorpath" ) ) { foundProcessorPath = true ; String procPath = javacArgs . get ( i + 1 ) ; procPath = procPath + System . getProperties ( ) . getProperty ( "path.separator" ) + nullawayJar ; javacArgs . set ( i + 1 , procPath ) ; break ; } } if ( ! foundProcessorPath ) { javacArgs . add ( "-processorpath" ) ; javacArgs . add ( nullawayJar ) ; } System . out . println ( "Running" ) ; runCompile ( javacArgs , 3 , 8 ) ; }
Some recommendations for this mode .