As seen in the modulepath and classpath mixture thread there are many possibilities how to execute unit tests. I've sumarised them on the ant-dev mailing list in the context of Apache Ant in http://mail-archives.apache.org/mod_mbox/ant-dev/201604.mbox/%3cafe6c849-0622-44d1-9ff7-3a6ca4832...@oracle.com%3E As a result of the discussion I've created a pull request for Apache Ant JUnitTask to support JDK9 modules: https://github.com/apache/ant/pull/18
Thanks for comments! I will link them back to the pull request. -- Tomas