Relates :
|
JDK-8008187 :
|
A program invoking a static method on an interface is rejected with a java.lang.VerifyError. % javac src/StaticMethodInInterface.java src/TestStaticIF.java % java -classpath src TestStaticIF Exception in thread "main" java.lang.VerifyError: Illegal type at constant pool entry 5 in class TestStaticIF Exception Details: Location: TestStaticIF.main([Ljava/lang/String;)V @11: invokestatic Reason: Constant pool index 5 is invalid Bytecode: 0000000: b200 0212 0304 bd00 0459 03b8 0005 53b6 0000010: 0006 57b1 at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2467) at java.lang.Class.getMethod0(Class.java:2708) at java.lang.Class.getMethod(Class.java:1620) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:528) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:510)