[redirect to openjfx-dev list]
This was a deliberate change. The API doc for HostServices::showDocument
says:
"Opens the specified URI in a new browser window or tab."
I expect we will fix it on Linux at some point as well.
-- Kevin
On 3/2/2026 6:24 AM, Armin Schrenk wrote:
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