Can't run junit tests on Eclipse with Java 9

Viewed 1168

I try to play with Java 9 on Eclipse Oxygen 4.7. I have installed Java 9 Support for Oxygen from marketplace obviously. I can't get junit test to work. I've created simple maven project with two classes:

  • MyClass in src/main/java/testing
  • MyClassTest in src/test/java/testing

When I try to run junit test from eclipse I get the exception Class not found testing.MyClassTest. I'm assuming that for some reason directory target/test-classes is not included into classpath.

If go back to java 1.8 in project settings, then junit test run just fine.

  • in Project Settings -> Java Compiler switch JDK compliance to 1.8
  • in Project Settings -> Java Build Path change JRE System library to 1.8

What can I do to run this test with Java 9 within Eclipse?

1 Answers
Related