package bar;
public class Foo {
protected void doit() {
StaticClass.doit1();
}
}
package bar;
final class StaticClass {
static void doit1() {
}
}
StaticClass is in a higher classloader than class Foo. When I call doit() on a foo object I get an IIlegalAccessError.. Whats going on because my
IDE did not complain about this and usually something like this should be caught
at compile time which makes me suspect that its a classloader issue.
Can Foo access a package leve method of package level class defined in a higher class loader?