Sep 17, 2018

Java DestroyJavaVM thread

All POJO apps start by invoking the main method. In it's most simple case this method will do all of the work, creating objects, calling methods etc. Once main completes, the JVM is told to shut down using a DestroyJavaVM thread which waits for all non-daemon threads to complete before doing it's work. This is to ensure that any threads you create run to completion before the JVM is torn down.
Any app that creates threads and relies solely on their functionality will allways have a DestroyJavaVM thread waiting for it to finish. Since all it is doing is joining all other running threads it does not consume any resources.