Use a loop:
static Runnable myThread = new Runnable() { public void run() { for (;;) { try { ... } catch(Exception e) { ... } } } }
Whatever you do, I would strongly recommend that you silently ignore the exception. If there is no better way to handle the exception, at least register it.
source share