Im doing nashorn lately and so went to read about the java.util.concurrent.
Ive an issue where i can run simple executors like :
Executors.newFixedTh
Those executors are spawning non-daemon threads which are preventing the JVM from exiting.
Try shutting down the executors when you are done with them using:
executor.shutdown();