So in order to handle this with the threadpool meant adding some features to the threadpool that ECJ already has, which OF COURSE meant rewriting it from scratch and refactoring the various classes which use it. :-) I *think* the new version works but (ahem) who knows. Here are some new classes you can try. Tell me if things work a bit better. The general idea was to push the thread back in the thread pool when it was finished rather than killing it; that way you'd not be recreating zillions of threads which is causing the Java VM memory leak you're seeing.