NetBeans APIs offer an "active" reference queue which is automatically cleaned by one dedicated NetBeans thread. Once we got a bug report that it behaves poorly when used inside of a WAR file. Whenever the WAR was redeployed, the number of cleanup threads increased by one, which also caused major memory leaks. We fixed that with a bit of reflection (nasty, of course). The fix worked OK, up until JDK-6853696 got fixed - the JDK-6853696 fix broke our assumptions, so now NetBeans is significantly broken on JDK9. I can either come up with another reflective trick or be constructive and improve JDK to offer the functionality we need. This issue is my attempt to propose such JDK change.