Skip to content

Conversation

ctrueden
Copy link
Contributor

@ctrueden ctrueden commented Aug 1, 2025

This patch invokes SciJava's ReflectionUnlocker as appropriate, to reduce the need for passing --add-opens flags when running code within this project. With this change, only one flag should be required: --add-opens=java.base/java.lang=ALL-UNNAMED, which is the flag that gives permission to the ReflectionUnlocker to use reflection to do its thing. :laugh:

It also updates to the latest release of pom-scijava, as well as updating the copyright blurb year to 2025.

ctrueden added 3 commits July 23, 2025 10:43
And fix compile errors.
With Java 17+, java.lang.reflect functions do not work on
modularized code (including core Java library code!) unless the
corresponding package of the containing module has been explicitly
opened with a --add-opens VM argument. Or unless we hack around it
using the SciJava App Launcher's ReflectionUnlocker.
@ctrueden
Copy link
Contributor Author

ctrueden commented Aug 1, 2025

Ach, I forgot that pom-scijava 41.1.0 was not actually a real thing. 😅

This PR will be useful once pom-scijava 42.0.0 is released, though... so for now, converting to draft.

@ctrueden ctrueden marked this pull request as draft August 1, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant