Register a classname as resource when it has been created on the fly.