Arquillian Embedded Tests with Jakarta EE 10 & Java 17


I am trying to get my Jakarta EE 10 starter project running with Java 17 which includes Arquillian tests running using the embedded container. I have been getting errors:
java.lang.reflect.InaccessibleObjectException: Unable to make field private java.util.WeakHashMap accessible: module java.base does not “opens” to unnamed module @38bc8ab5 etc.
I think I need the line from this doc (JDK 17 Considerations) to open the packages:
Payara Server Embedded :: Payara Enterprise Documentation
However the line has an entry which I am not sure how to handle:

Digging some more I found the bug report:
Bug Report: The Arquiliian test with Payara Embedded All failed. · Issue #6347 · payara/Payara · GitHub

Using the following JAVA_TOOL_OPTIONS solves the problem.