Skip to content

8377972: Desktop.browse() no longer delegates custom URI schemes to the OS handler and instead opens the default browser - #32247

Draft
prsadhuk wants to merge 1 commit into
openjdk:masterfrom
prsadhuk:JDK-8377972
Draft

8377972: Desktop.browse() no longer delegates custom URI schemes to the OS handler and instead opens the default browser#32247
prsadhuk wants to merge 1 commit into
openjdk:masterfrom
prsadhuk:JDK-8377972

Conversation

@prsadhuk

@prsadhuk prsadhuk commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Desktop.browse currently launches applications in browser and restricts running binaries/app URIs (executables) directly.
However it does so even if corresponding associated native app exists meaning, say, if calculator app exists in native system and Desktop.browse is called with calculator URI, then also the browser is launched and app is tried to be opened in the browser and not in corresponding native app.

To mitigate this, we have introduced a system property awt.desktop.browse_insecure to allow the user to provide URI schemes that will be allowed to be opened in corresponding app and not in default browser
User can set this property as common separated list of allowed schemes like
-Dawt.desktop.browse_insecure=calculator,file [ where calculator and file scheme will be opened in calculator and File Explorer app respectively]
or -Dawt.desktop.browse_insecure=* (all schemes allowed).
So,
If -Dawt.desktop.browse_insecure is set or scheme is in the allowed list => URI is launched in associated app.
If -Dawt.desktop.browse_insecure is NOT set or scheme is NOT in the allowed list => Browser is launched and URI is handled by the browser.



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8377972: Desktop.browse() no longer delegates custom URI schemes to the OS handler and instead opens the default browser (Bug - P3)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32247/head:pull/32247
$ git checkout pull/32247

Update a local copy of the PR:
$ git checkout pull/32247
$ git pull https://git.openjdk.org/jdk.git pull/32247/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32247

View PR using the GUI difftool:
$ git pr show -t 32247

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32247.diff

…he OS handler and instead opens the default browser
@bridgekeeper

bridgekeeper Bot commented Aug 7, 2026

Copy link
Copy Markdown

👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Aug 7, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot added the client client-libs-dev@openjdk.org label Aug 7, 2026
@openjdk

openjdk Bot commented Aug 7, 2026

Copy link
Copy Markdown

@prsadhuk The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk

openjdk Bot commented Aug 7, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: client. This can be overridden with the /reviewers command.

@prsadhuk
prsadhuk marked this pull request as draft August 7, 2026 04:09
@openjdk openjdk Bot changed the title 8377972: Desktop.browse() no longer delegates custom URI schemes to the OS handler and instead opens the default browser 8377972: Desktop.browse() no longer delegates custom URI schemes to the OS handler and instead opens the default browser Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

1 participant