question: static void forceKill ( String commandUID ) { if ( ! ExecutorUtils . isUnixOS ( ) ) return ; AsyncCommandResult killRes = null ; try { File binDir = new File ( "/bin" ) ; if ( ! binDir . exists ( ) ) return ; final String pkillScript = binDir . getPath ( ) + File . separator + ExecutorContstants . KILL_TEST_SCRIPT ; SimpleCommand killCmd = new SimpleCommand ( "Kill JVM" , pkillScript , commandUID ) ; killRes = Executor . executeAsync ( killCmd , null ) ; killRes . waitFor ( 5 * 1000 ) ; } catch ( InterruptedException e ) { } finally { if ( killRes != null ) killRes . stop ( false ) ; } }
target:  Kill JavaCommand by kill-9 with JavaCommand UID NOTE: This method only relevant for Unix based machines.