Hi, I have the following code: ... private static ScheduledExecutorService executor = Executors.newScheduledThreadPool(10); ... final Future future = executor.submit(new Callable() { public Boolean call() { try { return MyClass.nativeMethod(); } catch (Exception e) { // TODO Auto-generated catch block } return false; } }); ... executor.schedule(new Runnable(){ public void run(){ future.cancel(true); } }, 5000, TimeUnit.MILLISECONDS); I'm running the aforementioned code inside ...