I have a project that has it's own classloader. But I'm having a strange problem when loading some classes.
Basically, it is like:
@Override
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
{
// do some magic
return myBrandNewClas;
}
But what happens is that, even returning a class, the Class.forName(...) still throws a ClassNotFoundException (example can be found here).
Another info: the returned class' name is different of the requested class name.
I'm start wondering whether it is a security lock of JVM (tested in Oracle JVM).
Thanks!