title: Why Gradle build fail with java8?
body: <p>We have Gradle script it is building multiple projects with different sourceCompatibility and targetCompatibility. If my environment variables JAVA_HOME set to jdk7 all the projects are building successfully. Then I changed the JAVA_HOME to jdk8. Now build fail with below errors:</p>
  
  <pre><code> FATAL ERROR in native method: processing of -javaagent failed
  FATAL ERROR in native method: processing of -javaagent failed
  
  ava.lang.VerifyError: Expecting a stackmap frame at branch target 51
      Exception Details:
        Location:
          com/test/Tray.&lt;clinit&gt;()V @42: ifnull
        Reason:
          Expected stackmap frame at this location.
        Bytecode:
          0x0000000: 08bd 0063 5903 1264 5359 0412 6553 5905
          0x0000010: 1266 5359 0612 6753 5907 1268 53b3 006a
          0x0000020: 08bd 006c 5903 00b2 0080 c600 09b2 0080
          0x0000030: a700 0c12 82b8 0084 59b3 0080 0053 5904
  
  
  
  
  
  java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:497)
          at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
          at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
  Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
          at org.jacoco.agent.rt_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
          at org.jacoco.agent.rt_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)
          at org.jacoco.agent.rt_6l8m50.JacocoAgent.createRuntime(JacocoAgent.java:128)
          at org.jacoco.agent.rt_6l8m50.JacocoAgent.init(JacocoAgent.java:74)
          at org.jacoco.agent.rt_6l8m50.JacocoAgent.premain(JacocoAgent.java:165)
          ... 6 more
  Caused by: java.lang.NoSuchFieldException: $jacocoAccess
          at java.lang.Class.getField(Class.java:1703)
          at org.jacoco.agent.rt_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:136)
          ... 10 more
  Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseSplitVerifier; support was removed in 8.0
  Exception in thread "main" Could not write standard input into: Gradle Test Executor 2.
  java.io.IOException: The pipe is being closed
          at java.io.FileOutputStream.writeBytes(Native Method)
          at java.io.FileOutputStream.write(FileOutputStream.java:326)
          at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
          at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
          at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:50)
          at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
  java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:497)
          at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
          at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
  Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
          at org.jacoco.agent.rt_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
          at org.jacoco.agent.rt_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)
          at org.jacoco.agent.rt_6l8m50.JacocoAgent.createRuntime(JacocoAgent.java:128)
          at org.jacoco.agent.rt_6l8m50.JacocoAgent.init(JacocoAgent.java:74)
          at org.jacoco.agent.rt_6l8m50.JacocoAgent.premain(JacocoAgent.java:165)
          ... 6 more
  </code></pre>
  
  <p>Could you please tel me how to fix this issue with java8?</p>