Testing Code that uses HostServices

Robert Lichtenberger r.lichtenberger at gmail.com
Mon Oct 9 08:59:10 UTC 2023


I have the task of testing some code that eventually calls 
javafx.application.HostServices.showDocument(...) with a URL that will 
open the web browser in production.

During the test runs I don't want the browser to be opened but instead 
have some custom code be executed.

Unfortunately HostServices ist final, so I cannot overwrite it. Is there 
another way to install "my own" host services?


Best regards,

Robert



More information about the openjfx-dev mailing list