https://kotlinlang.org logo
Title
g

groostav

10/01/2018, 10:05 PM
Alright so, its also the case that if A depends on B statically, and B encounters an exception in its static initializer, and the runtime calls
A.main
as its entry point, the only thing you'll see is
NoClassDefFoundError: Cannot find 'com.you.A'
correct? without a caused-by
ExceptionInInitializer
?
k

karelpeeters

10/01/2018, 10:12 PM
That's just a Java question then, but I can't get it to happen with something like this:
public class A extends B {
    public static void main(String[] args) {
        System.out.println("Hello world");
    }
}

public class B {
    static {
        if (true) {
            throw new RuntimeException();
        }
    }
}