Arquillian Embedded Tests with Jakarta EE 10 & Java 17

Hello,

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 java.net.URLClassLoader.closeables accessible: module java.base does not “opens java.net” 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:
-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar

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.

export JAVA_TOOL_OPTIONS=“-Djdk.util.zip.disableZip64ExtraFieldValidation=true
-Djdk.attach.allowAttachSelf=true
–add-opens=java.base/java.io=ALL-UNNAMED
–add-opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED
–add-opens=java.base/java.net=ALL-UNNAMED
–add-opens=java.naming/javax.naming.spi=ALL-UNNAMED
–add-opens=java.base/java.lang=ALL-UNNAMED”