# Run tests with JDK9 and version 2.14

**URL:** <https://discuss.gradle.org/t/run-tests-with-jdk9-and-version-2-14/18146>\
**Category:** Bugs\
**Created:** [June 21, 2016, 2:07pm UTC](https://discuss.gradle.org/t/run-tests-with-jdk9-and-version-2-14/18146 "2016-06-21T14:07:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Horcrux7](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/horcrux7/32/96_2.png) [@Horcrux7](https://discuss.gradle.org/u/Horcrux7)\
**Post date:** [June 21, 2016, 2:07pm UTC](https://discuss.gradle.org/t/run-tests-with-jdk9-and-version-2-14/18146/1 "2016-06-21T14:07:59Z")

</div>

Is it possible to run Tests with Java 9? We want check if our application is compatible with the coming Java 9. We does not need any Java 9 features. We have simple set the executable for the test task. We have try the current version 2.14 without any luck.

```
Error occurred during initialization of VM
java.lang.ClassCastException: jdk.internal.loader.ClassLoaders$AppClassLoader (in module: java.base) cannot be cast to java.net.URLClassLoader (in module: java.base)
    at worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager.checkPermission(BootstrapSecurityManager.java:60)
    at java.lang.SecurityManager.checkPropertyAccess(java.base@9-ea/SecurityManager.java:1285)
    at java.lang.System.getProperty(java.base@9-ea/System.java:762)
    at java.lang.ClassLoader.initSystemClassLoader(java.base@9-ea/ClassLoader.java:1728)
    at java.lang.System.initPhase3(java.base@9-ea/System.java:1980)

Could not write standard input into: Gradle Test Executor 1.
java.io.IOException: Die Pipe wird gerade geschlossen
    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:56)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    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)
```

---

<div class="post-metadata">

**Author:** ![eriwen](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/eriwen/32/4786_2.png) [@eriwen](https://discuss.gradle.org/u/eriwen)\
**Post date:** [June 22, 2016, 12:26am UTC](https://discuss.gradle.org/t/run-tests-with-jdk9-and-version-2-14/18146/2 "2016-06-22T00:26:47Z")

</div>

Good news, everyone.

We **just** released [Gradle 3.0 M2](https://github.com/gradle/gradle/releases/tag/v3.0.0-M2) with initial Java 9 support.

Please give it a try and [let us know](https://discuss.gradle.org/c/3-0-m2) if it’s not working for you.

---

<div class="post-metadata">

**Author:** ![Horcrux7](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/horcrux7/32/96_2.png) [@Horcrux7](https://discuss.gradle.org/u/Horcrux7)\
**Post date:** [June 22, 2016, 6:20am UTC](https://discuss.gradle.org/t/run-tests-with-jdk9-and-version-2-14/18146/3 "2016-06-22T06:20:50Z")

</div>

Thanks for the hint. I have try it and post the first error with the jacoco plugin: [Jacoco plugin does not work with Java 9](https://discuss.gradle.org/t/jacoco-plugin-does-not-work-with-java-9/18157)
