When running the Repast Simphony GUI, I can supply JVM options to get around the IllegalAccess exceptions (e.g. --add-opens <module>/<package>=ALL-UNNAMED). When I try to run in batch mode, the JVM arguments do not get passed along to where the run is kicked off.
For example, I get an IllegalAccessError "because module java.xml does not export com.sun.org.apache.xpath.internal.objects to unnamed module" even though I have this in my VM arguments: --add-opens=java.xml/com.sun.org.apache.xpath.internal.objects=ALL-UNNAMED.
How can I pass the "add-opens" VM arguments I need to a batch run? Without being able to do that, I am stuck on Java 11. I am using Repast 2.10.0.
I tried to upgrade from Repast 2.9.1 with Java 11 to Repast 2.10.0 with Java 17. Using Repast 2.10.0 with Java 11 works, but I get the above errors (or similar) with Java 17.
You should be able to add the required "add-open"s to the VM arguments box in the Batch Run Configuration GUI. The box is a bit small for adding all the required arguments (it was coded prior to all this being necessary), but it should work. I'll add an issue to our issue tracker to make the required Java 17 arguments part of the defaults.
Update: Possible fix outlined here:
https://github.com/Repast/repast.simphony/issues/86