Hello,
I use static field and I have java.lang.NoClassDefFoundError occurring. I have two classes C1 and C2 (in my case, they are not in the same package).
Code:
class C1
{
static String fld = "...";
}
class C2
{
static String fld = "..."+C1.fld;
}
The java.lang.NoClassDefFoundError occurs on C2. I have the impression that the field of C2 can be initialized only if the class C1 has been charged. Is this true? How impossibility to classloader order on classes? I watched from the side of import static but without success. If you have any idea about this then please help me. Thanks in advance.
Bookmarks