public void forceTerminate(){
        toProcess.println("0");
        toProcess.flush();
        for(int i=0;i<5;i++){
            try{
                process.exitValue();
                return;
            }catch(IllegalThreadStateException e)
            {
                try{
                    Thread.sleep(1000);
                }catch(InterruptedException ie){}
            }
        }
        process.destroy();        
    }