Java 1.8 ASM modified code throws NoSuchFieldError

Hi!
I use ASM to modify this code:
private Launch() {
    URLClassLoader ucl = (URLClassLoader)this.getClass().getClassLoader();
    classLoader = new LaunchClassLoader(ucl.getURLs());
    blackboard = new HashMap();
    Thread.currentThread().setContextClassLoader(classLoader);
}

into
private Launch() {
    URLClassLoader ucl = (URLClassLoader)this.getClass().getClassLoader();
    classLoader = new CustomLaunchClassLoader(ucl.getURLs());
    blackboard = new HashMap();
    Thread.currentThread().setContextClassLoader(classLoader);
}

but when I execute it, it throws a NoSuchFieldError on the classLoader field.
classLoader is a private static field.
Was this page helpful?