--- old/src/java.rmi/share/classes/sun/rmi/transport/GC.java 2016-07-26 16:16:26.000000000 +0100 +++ new/src/java.rmi/share/classes/sun/rmi/transport/GC.java 2016-07-26 16:16:26.000000000 +0100 @@ -144,6 +144,11 @@ Daemon d = new Daemon(tg); d.setDaemon(true); d.setPriority(Thread.MIN_PRIORITY + 1); + /* Set the context class loader to null in order to avoid + * keeping a strong reference to the TCCL of whatever + * thread triggered the creation of this Daemon. + */ + d.setContextClassLoader(null); d.start(); GC.daemon = d; return null;