You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that recentish Java versions enforce stricter access controls for reflection methods than formerly. (Transcript below.)
I don't know if this is the right way to fix it, but it seems that adding --add-opens java.base/java.lang=ALL-UNNAMED to the java startup flags in the abcl script makes this problem go away, at least for the simple cases I've tried.
$ abcl
Failed to introspect virtual threading methods: java.lang.reflect.InaccessibleObjectException: Unable to make public java.lang.Thread java.lang.ThreadBuilders$VirtualThreadFactory.newThread(java.lang.Runnable) accessible: module java.base does not "opens java.lang" to unnamed module @6bd28748
Armed Bear Common Lisp 1.9.2
Java 21.0.5 MacPorts
OpenJDK 64-Bit Server VM
Low-level initialization completed in 0.203 seconds.
Startup completed in 0.899 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (system:process-pid (system:run-program "sleep" '("10") :wait nil))
#<THREAD "interpreter" native {1D8E781E}>: Debugger invoked on condition of type JAVA-EXCEPTION
Java exception 'java.lang.reflect.InaccessibleObjectException: Unable to make field private final int java.lang.ProcessImpl.pid accessible: module java.base does not "opens java.lang" to unnamed module @6bd28748'.
The text was updated successfully, but these errors were encountered:
I do that too but there still remain fields that are inaccessible. I haven't investigated why or whether there is a workaround. I have a feeling that more --add-opens for different modules need to be added to the command line.
Aspirationally, I would put all this logic into Common Lisp that would create the necessary wrapper scripts for UNIX/Windows, but that effort has never materialized.
It appears that recentish Java versions enforce stricter access controls for reflection methods than formerly. (Transcript below.)
I don't know if this is the right way to fix it, but it seems that adding
--add-opens java.base/java.lang=ALL-UNNAMED
to the java startup flags in the abcl script makes this problem go away, at least for the simple cases I've tried.The text was updated successfully, but these errors were encountered: