Detach java agent runtime

What's your concern when these are still running?

Setting elastic.apm.active should do what you want and also gives you the possibility to activate the agent again at runtime.

After a timeout of 5s this thread should stop too.