You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HostServices.showDocument does not work on Mac. It fails with a message saying that AWT is currently not supported on Substrate VM. This is due to the fact that, only on the Mac, the HostServicesDelegate calls Desktop.getDesktop().browse to launch a browser. For other platforms Runtime.getRuntime().exec is used. I am wondering why this is not also done for the Mac. The single line Runtime.getRuntime().exec(new String[]{"open", uri}); would do the trick and is even better than, e.g., the current Linux variant which just searches through a list of browser names and picks the first one it finds. This change would fix the problem on Substrate VM and also remove the dependency on java.awt.Desktop. I have tested this on a standard VM as well as with substrate via the client-maven-plugin and it works without problem.
HostServices.showDocument does not work on Mac. It fails with a message saying that
AWT is currently not supported on Substrate VM. This is due to the fact that, only on the Mac, the
HostServicesDelegate
callsDesktop.getDesktop().browse
to launch a browser. For other platformsRuntime.getRuntime().exec
is used. I am wondering why this is not also done for the Mac. The single lineRuntime.getRuntime().exec(new String[]{"open", uri});
would do the trick and is even better than, e.g., the current Linux variant which just searches through a list of browser names and picks the first one it finds. This change would fix the problem on Substrate VM and also remove the dependency on java.awt.Desktop. I have tested this on a standard VM as well as with substrate via the client-maven-plugin and it works without problem.macOS 10.14.6
GraalVM 19.3.1
client-maven-plugin 0.1.15
jfx 15-ea+1
The text was updated successfully, but these errors were encountered: