I have a class having static final methods.[Say A,B,C].
C invokes another class D[D's package is imported in C].
The maven assembly jar[say M.jar] that I have DOESN'T HAVE package D. During runtime, when I try to call A having M.jar in classpath, getting noclasdef error saying D is not present.
Why I am getting this?
package TEST1
import test.CHECK.TestA;
import test.CHECK.TestB;
class Factory
{
final static A()
{
//some ref to test.CHECK.TestA
}
static B()
{
//some ref to test.CHECK.TestB
}
static C()
{
}
I have jar containing this class and package test.CHECK.TestB in that jar. However, this jar doesn't contain test.CHECK.TestA.
Now, my client program having this jar calls C().
Then, getting ClassNotFoundException for TestA, though we are not calling A(). Why is this so?