When running a recent Jenkins with a JVM greater than 6 (which is required for lucene), the runtime will crash with java.lang.VerifyError. This is most likely caused by incorrect byte code manipulation by something in jenkins core. Adding the flag "-XX:-UseSplitVerifier" to the java 7 JVM removes the problem. More information on the problem is here:
Lucene is compiled to Java 7 because java 6 has been deprecated since 2013 (even if some support is available to 2017), so without java 7 support, it won't work.
java.lang.VerifyError: Expecting a stackmap frame at branch target 22
org/apache/lucene/util/packed/PackedInts$Format.<init>(Ljava/lang/String;II)V @13: ifeq
Expected stackmap frame at this location.
0x0000000: 2a2b 1cb7 0050 2a1d 1202 b800 5499 0009
0x0000010: b500 56a7 0006 b500 56b1