In my application, I use classes that are contained in a jar file. One such class is called "jarStuff.ClassInJar"
I have a reference to a ClassInJar object that gets instantiated in the constructor of Class A when the program is started.
Basically:
Occasionally (1 out of 10 times), I get the following error:
Exception in
Thread Main java.lang.NullPointerException
at test.A<init>Unknown Source
I'm not sure what the cause of the error is, but it is not consistent, and only occurs occasionally.
1. Is it possible that the error is getting thrown because the jar file has not yet been loaded before the constructor is called?
2. Is there a way to programatically verify a jar file has been loaded (and its classes are available) when a program starts?
Thank you.