title: Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory
body: <h2>The problem</h2>
  
  <p>Whenever I run my projects JUnit test (using JUnit 5 with Java 9 and Eclipse Oxygen 1.a) I encounter the problem that eclipse can't find any tests.</p>
  
  <h2>The description</h2>
  
  <p>Under the run configuration, eclipse can't even find the method which is annotated with @Test, but instead only shows me "<em>(all methods)</em>".
  The following picture hopefully gives a better glimps of my setup:</p>
  
  <p><a href="https://i.stack.imgur.com/wVTPt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wVTPt.png" alt="https://imgur.com/a/FTe9c"></a></p>
  
  <h2>Console output:</h2>
  
  <pre><code>java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory
      at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.&lt;init&gt;(JUnit5TestLoader.java:31)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
      at java.base/java.lang.Class.newInstance(Unknown Source)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:368)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:363)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:307)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:222)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
  Caused by: java.lang.ClassNotFoundException: org.junit.platform.launcher.core.LauncherFactory
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
      at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
      ... 11 more
  </code></pre>
  
  <h2>What I tried so far</h2>
  
  <p>I've already tried</p>
  
  <ul>
  <li>to remove the test folder from build path and add it again.</li>
  <li>to start the test with hovering over the method annotated with @Test and then click "Run as JUnit Test". </li>
  <li>remove JUnit from Buildpath and add it again</li>
  <li>restart eclipse</li>
  <li>I've also moved the project whole project from one machine to another machine and tried it with the provided eclipse installation there</li>
  <li>to rename the test method.</li>
  <li>to retype the @Test annotation</li>
  </ul>
  
  <p>Some of these steps <a href="https://stackoverflow.com/questions/20057771/no-junit-tests-found-in-eclipse">can be found here</a>, but in the end the problem remained.</p>