I had to make a couple tweaks to get the attached test project into a presentable state. But mrJar v0.0.16 does pass this one simple functional test which kinda-sorta models your problem.
Getting access to com.sun.javafx.stage.StageHelper
was relatively straightforward. I configured the jpmsOpts
property of the mrjar{}
block with an add-exports
to allow the test application to import and access com.sun.javafx.stage.StageHelper
…
You’ll see in the recording that to verify that the test application’s module does have access to that JavaFX module’s package, I simply import that class and call StageHelper.getStageAccessor( )
instead of calling the setPrimary(Stage)
method you mentioned.
I don’t do the setPrimary(Stage)
method call in the test project; only because I didn’t have a specialized implementation of Stage
to pass it. Implementing one would have been more time-consuming, besides, since I’m pretty green with JavaFX.
Getting access to the package and class of the javafx.graphics
module was the main focus of this particular test anyway. Of course, any public method on that StageHelper
class could be called, in actual real usage.
Once again, Graou74, your feedback was super valuable in helping me flesh out this functional test. So I sincerely appreciate it