classloader gymnastics: create a resolver to obtain the correct classloader in managed environments