mercredi 5 septembre 2018

ClassNotFoundException: Strange Behavior

I have two classes: A and B in the same project but in different packages.

When A tries to create B dynamically, it fails. Class c = Class.forName("B"); //fails

But when I create the class object statically, it works fine. B b = new B();

Any ideas?





Aucun commentaire:

Enregistrer un commentaire