You should add setDaemon(true) here to avoid having this thread block the JVM from exiting