I am writing a program that loads all classes from a specified folder.
Some classes create objects in a static block, and these objects, in turn, create some of their own calls during their creation. Since I don't have a native library, I see java.lang.UnsatisfiedLinkError
Here is an example script.
Class A extends SuperA
{
public static B b = new B();
...
...
}
Class B
{
public B()
{
someNativeCall();
}
}
Class.forName("A");
I am loading class A here to check out some of its properties, such as its superclasses, etc. Therefore, it doesnโt even matter to me whether B is created or not :) Since there can be many classes in this folder, such as A, is there a general way to make sure that loading classes like A is not interrupted?
Update: I know that a native library should be present and how to add it. But I do not have a native library, and therefore I ask about it.