Consider the following test:
package p;
public class Test {
public static void main(String[] args) throws Exception {
Package p = Test.class.getPackage();
}
}
mkdir bootclasses
javac -d bootclasses Test.java
java -Xbootclasspath/a:bootclasses p.Test
With an exploded build then this trips up on an assert in classLoader.hpp:
# Internal Error (hotspot/src/share/vm/classfile/classLoader.hpp:403), pid=49574, tid=5123
# assert(n >= 0 && n < _num_entries) failed: sanity
Assertion was added as part of JDK-8072061.