[External] : JavaFX 25.0.2: Undocumented change about HostServices

Armin Schrenk armin.schrenk at skymatic.de
Mon Mar 2 14:24:28 UTC 2026


Hello,

when updating our application to the latest JavaFX 25.0.2 patch, we 
noticed a behavioural change when opening URIs with 
HostServices::showDocument.

* Scenario: App wants to show the user a local file location, i.e. 
"C:\some\path" by constructing a URI and open the URI.
* Call in JavaFX: hostService.showDocument("file:///C:/some/path")
* Before: Windows File Explorer opened, showing the targeted resource
* After update to version 25.0.2: Internet browser opens, doing 
something with the URI (download file, show directory, etc)

Also macOS is affected by this, while on Linux the behaviour is the old one.


I think the PR 
https://github.com/openjdk/jfx/commit/fb60335eca66be80ad4ab9b0b11d96214f194117#diff-f12d806d18f22eb9d23118c40d6e26fb784096681107d780f5a9d7305b4980fe 
has caused it.

The documentation is a not clear about the HostServices::showDocument 
(https://openjfx.io/javadoc/25/javafx.graphics/javafx/application/HostServices.html):
 > Opens the specified URI in a new browser window or tab. The 
determination of whether it is a new browser window or a tab in an 
existing browser window will be made by the browser preferences. Note 
that this will respect the pop-up blocker settings of the default 
browser; it will not try to circumvent them.

Is a "browser" an internet browser. Or also a file browser? Interpreting 
"browser" as internet OR file browser, the before-update behaviour was 
as expected.

Anyways, for a patch version this is either a bug or this should be 
noted in the release notes and the documentation updated.

Kind regards

-- 
Armin Schrenk
Desktop Team Lead and People Operations
+49 15785160554

Skymatic GmbH, Am Hauptbahnhof 6, 53111 Bonn
Sitz der Gesellschaft: Bonn; Amtsgericht Bonn, HRB 22635
Geschäftsführer: Tobias Hagemann, Sebastian Stenzel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-discuss/attachments/20260302/1fe5e385/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4839 bytes
Desc: Kryptografische S/MIME-Signatur
URL: <https://mail.openjdk.org/pipermail/openjfx-discuss/attachments/20260302/1fe5e385/smime.p7s>


More information about the openjfx-discuss mailing list