When I using the Class.forName
to load a class, there is an exception
ClassNotFoundException
Do you know what may be reason?
Class<?> cl;
try {
cl = Class.forName("com.qti.server.power.ShutdownOem");
}
catch(ClassNotFoundException e) {
Log.d("localdebug", "testLoadClass ClassNotFoundException com.qti.server.power.ShutdownOem");
}
Class.forName() only accepts
fully-qualified names
, secondly class may not be present at the time of loading intoclassloaders
refer here for more