The relevant code calls java.awt.Desktop#browse or executes - on Windows - start - both with an argument of the URI of the PDF to open. Exactly what the URI looks like depends a little on what you are looking at - an embedded PDF or a filesystem PDF.
Actually, the docs of the above method says
Launches the default browser to display a
URI. If the default browser is not able to handle the specifiedURI, the application registered for handlingURIsof the specified type is invoked.
so it should work. The relevant OpenJDK code is here, and the latest commit relevant is here which was from the 19th of January, 2026 - and could be part of the 26 release of OpenJDK.
The browse handling went from something simple as open <url> to a getting the default browser and then opening the URL in that. Arguably that is a regression, and a bug report seems in order.
@mvanleeuwen102 Perhaps you can locate some PDF on your machine - say C:\Users\you\Desktop\MyTest.pdf and verify that running
C:\> start C:\Users\you\Desktop\MyTest.pdf
in the cmd prompt does indeed open the PDF in Acrobat reader.
Then, next, open your default Web-browser, and type into the location field
file:C:\Users\you\Desktop\MyTest.pdf
and see if it opens the PDF in the browser or Acrobat Reader.
Yours,
Christian