Every time the application attempts to open the browser, it fails with the exception in the title. I'm running Kubuntu 18.04, and it seems that desktop integrations are not so good in the system. I've tried some different solutions found on the internet like ensuring the default browser is specified in KDE, updating all the packages, but nothing fixed the issue. StackOverflow guys advice to switch to usage of native API here https://stackoverflow.com/questions/18004150/desktop-api-is-not-support…
$ java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)
Full stack:
020-08-06-15:24:02 [AWT-EventQueue-0/ERROR] [Exception] Uncaught exception in AWT-EventQueue-0
java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
at java.awt.Desktop.checkActionSupport(Desktop.java:221) ~[?:1.8.0_252]
at java.awt.Desktop.browse(Desktop.java:380) ~[?:1.8.0_252]
at net.mcreator.ui.a.a.a.l.a(SourceFile:38) ~[mcreator.jar:?]
at net.mcreator.ui.a.f.actionPerformed(SourceFile:51) ~[mcreator.jar:?]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) ~[?:1.8.0_252]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) ~[?:1.8.0_252]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) ~[?:1.8.0_252]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) ~[?:1.8.0_252]
at javax.swing.AbstractButton.doClick(AbstractButton.java:376) ~[?:1.8.0_252]
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842) ~[?:1.8.0_252]
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886) ~[?:1.8.0_252]
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) ~[?:1.8.0_252]
at java.awt.Component.processMouseEvent(Component.java:6539) ~[?:1.8.0_252]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) ~[?:1.8.0_252]
at java.awt.Component.processEvent(Component.java:6304) ~[?:1.8.0_252]
at java.awt.Container.processEvent(Container.java:2239) ~[?:1.8.0_252]
at java.awt.Component.dispatchEventImpl(Component.java:4889) ~[?:1.8.0_252]
at java.awt.Container.dispatchEventImpl(Container.java:2297) ~[?:1.8.0_252]
at java.awt.Component.dispatchEvent(Component.java:4711) ~[?:1.8.0_252]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) ~[?:1.8.0_252]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) ~[?:1.8.0_252]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) ~[?:1.8.0_252]
at java.awt.Container.dispatchEventImpl(Container.java:2283) ~[?:1.8.0_252]
at java.awt.Window.dispatchEventImpl(Window.java:2746) ~[?:1.8.0_252]
at java.awt.Component.dispatchEvent(Component.java:4711) ~[?:1.8.0_252]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) ~[?:1.8.0_252]
at java.awt.EventQueue.access$500(EventQueue.java:97) ~[?:1.8.0_252]
at java.awt.EventQueue$3.run(EventQueue.java:709) ~[?:1.8.0_252]
at java.awt.EventQueue$3.run(EventQueue.java:703) ~[?:1.8.0_252]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_252]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) ~[?:1.8.0_252]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) ~[?:1.8.0_252]
at java.awt.EventQueue$4.run(EventQueue.java:733) ~[?:1.8.0_252]
at java.awt.EventQueue$4.run(EventQueue.java:731) ~[?:1.8.0_252]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_252]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) ~[?:1.8.0_252]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) ~[?:1.8.0_252]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) [?:1.8.0_252]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_252]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_252]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_252]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_252]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_252]
Issue comments
I will consider adopting this one: https://github.com/jjYBdx4IL/misc/blob/master/swing-utils/src/main/java/com/github/jjYBdx4IL/utils/awt/Desktop.java
Keep in mind I can't do testing as I don't have this platform.
Also the issue completely blocks me from launching the server, because it asks to accept the EULA, and I cannot agree on it since it cannot open the browser.