Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

System does not support Desktop API #439

Open
kparal opened this issue May 24, 2015 · 9 comments
Open

System does not support Desktop API #439

kparal opened this issue May 24, 2015 · 9 comments

Comments

@kparal
Copy link
Owner

kparal commented May 24, 2015

What steps will reproduce the problem?
1.install esmska from repository
2. launch esmska
3. open Help-About or any other link on WWW 

What is the expected output? What do you see instead?
- open default (firefox) WWW browser
- nothing + the following output from console:

Jan 17, 2012 3:23:06 PM esmska.gui.Actions$BrowseAction actionPerformed
WARNING: Running browser not supported, can't browse URL: http://code.google.com/p/esmska/wiki/Support

or

Jan 17, 2012 3:24:06 PM esmska.gui.AboutFrame setURI
WARNING: System does not support Desktop API, this URI won't work: http://esmska.googlecode.com/
java.lang.UnsupportedOperationException: Desktop API is not supported on the current
platform
        at org.jdesktop.swingx.hyperlink.HyperlinkAction.<init>(HyperlinkAction.java:131)
        at org.jdesktop.swingx.hyperlink.HyperlinkAction.createHyperlinkAction(HyperlinkAction.java:78)
        at org.jdesktop.swingx.hyperlink.HyperlinkAction.createHyperlinkAction(HyperlinkAction.java:62)
        at org.jdesktop.swingx.JXHyperlink.setURI(JXHyperlink.java:147)
        at esmska.gui.AboutFrame.setURI(AboutFrame.java:84)
        at esmska.gui.AboutFrame.initComponents(AboutFrame.java:160)
        at esmska.gui.AboutFrame.<init>(AboutFrame.java:57)
        at esmska.gui.Actions$AboutAction.actionPerformed(Actions.java:191)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:374)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:829)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:873)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
        at java.awt.Component.processMouseEvent(Component.java:6268)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6033)
        at java.awt.Container.processEvent(Container.java:2045)
        at java.awt.Component.dispatchEventImpl(Component.java:4629)
        at java.awt.Container.dispatchEventImpl(Container.java:2103)
        at java.awt.Component.dispatchEvent(Component.java:4455)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
        at java.awt.Container.dispatchEventImpl(Container.java:2089)
        at java.awt.Window.dispatchEventImpl(Window.java:2517)
        at java.awt.Component.dispatchEvent(Component.java:4455)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
        at java.awt.EventQueue.access$000(EventQueue.java:96)
        at java.awt.EventQueue$1.run(EventQueue.java:608)
        at java.awt.EventQueue$1.run(EventQueue.java:606)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
        at java.awt.EventQueue$2.run(EventQueue.java:622)
        at java.awt.EventQueue$2.run(EventQueue.java:620)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Jan 17, 2012 3:24:06 PM esmska.gui.AboutFrame setURI
WARNING: System does not support Desktop API, this URI won't work: http://code.google.com/p/esmska/wiki/Support
java.lang.UnsupportedOperationException: Desktop API is not supported on the current
platform
        at org.jdesktop.swingx.hyperlink.HyperlinkAction.<init>(HyperlinkAction.java:131)
        at org.jdesktop.swingx.hyperlink.HyperlinkAction.createHyperlinkAction(HyperlinkAction.java:78)
        at org.jdesktop.swingx.hyperlink.HyperlinkAction.createHyperlinkAction(HyperlinkAction.java:62)
        at org.jdesktop.swingx.JXHyperlink.setURI(JXHyperlink.java:147)
        at esmska.gui.AboutFrame.setURI(AboutFrame.java:84)
        at esmska.gui.AboutFrame.initComponents(AboutFrame.java:163)
        at esmska.gui.AboutFrame.<init>(AboutFrame.java:57)
        at esmska.gui.Actions$AboutAction.actionPerformed(Actions.java:191)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:374)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:829)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:873)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
        at java.awt.Component.processMouseEvent(Component.java:6268)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6033)
        at java.awt.Container.processEvent(Container.java:2045)
        at java.awt.Component.dispatchEventImpl(Component.java:4629)
        at java.awt.Container.dispatchEventImpl(Container.java:2103)
        at java.awt.Component.dispatchEvent(Component.java:4455)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
        at java.awt.Container.dispatchEventImpl(Container.java:2089)
        at java.awt.Window.dispatchEventImpl(Window.java:2517)
        at java.awt.Component.dispatchEvent(Component.java:4455)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
        at java.awt.EventQueue.access$000(EventQueue.java:96)
        at java.awt.EventQueue$1.run(EventQueue.java:608)
        at java.awt.EventQueue$1.run(EventQueue.java:606)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
        at java.awt.EventQueue$2.run(EventQueue.java:622)
        at java.awt.EventQueue$2.run(EventQueue.java:620)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)


What version of Esmska are you using? On what operating system?
- esmska 1.1
- openSUSE 12.1 KDE 64bit

If you have problem with a gateway, what its exact name and version is?
(see gateway tooltip)
no problem!!!

Please provide any additional information below.

Original issue reported on code.google.com by michal.kvasnicka on 2012-01-17 14:25:26

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

klidne muzeme komunikovat cesky ... :)

Original issue reported on code.google.com by michal.kvasnicka on 2012-01-17 14:46:31

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Jakou používáš Javu, OpenJDK nebo Oracle Java? Můžeš zkusit tu druhou.

Každopádně to je omezení Javy, že v KDE neumí pustit prohlížeč (v GNOME to funguje).
S tím nic neudělám. Pokud by Esmska při tom padala nebo vyhazovala nějaké škaredé hlášky,
tak to opravím, ale pokud se pouze "nic nestane", tak je to očekávané chování, když
tvůj desktop není současnou Javou podporován. Limitace platformy.

Original issue reported on code.google.com by kamil.paral on 2012-01-17 16:18:20

  • Labels added: OpSys-Linux, Component-UI

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Pouzivam openJDK 1.6.0_22 (deafaultni java v opensuse 12.1 GNOME i KDE). Priznam se,
ze se mi nechce jen kvuli "esmska" prechazet na sun-java a navic kdyz neni jiste ze
to bude po prechodu na sun-java fungovat.

Cekal bych, ze mi aspon reknes, na ktere jave to bude v opensuse 12.1 KDE fungovat.

V kazdem pripade oznacit to za omezeni javy na platforme KDE mi prijde ponekud zjednodusene.
Z meho pohledu to proste na opensuse 12.1 KDE nefunguje a je vyvojarich, aby s tim
neco udelali. Muj desktop je v seznamu "esmskou"podporovanych desktopu (openSUSE) a
nefunguji WWW linky.

Jinak samozrejmne chapu, ze nemam v podstate zadny narok neco pozadovat. Jinak je "esmska"
velice povedena aplikace. Jen je skoda, ze neni dotazena do plne funkcinality ani na
nejnovejsi verzi tak rozsirene distribuce jakou je opensuse KDE.

Original issue reported on code.google.com by michal.kvasnicka on 2012-01-17 18:05:51

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Která Java pod KDE funguje nevím, KDE nepoužívám. Pod GNOME to funguje v obou. Oracle
Javu můžeš zkusit, ale nevím, jestli si pomůžeš. Řekněme si to na rovinu, Java je na
desktopu mrtvá technologie.

Esmsku už teď nevyvíjím, pouze udržuju. Napadlo ale mě poměrně snadné (polo)řešení,
takže ho zde popíšu a třeba někdo někdy pošle patch.

Řešení: Místo přidávání hacků pro specifické platformy a prostředí, které obcházejí
limitace Javy, se jednoduše v situaci, kdy se nepovedlo spustit prohlížeč, zobrazí
vyskakovací dialog a v něm bude napsáno: "Nepovedlo se otevřít webový prohlížeč. Otevřete
si prosím následující stránku ručně: URL"

To je poměrně jednoduché a bude "fungovat" všude, takže uživatel nepřijde o nic důležitého,
i když ho to bude stát pár sekund navíc.

Original issue reported on code.google.com by kamil.paral on 2012-01-17 19:41:49

  • Labels added: Type-Enhancement, Usability
  • Labels removed: Type-Defect

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

(No text was entered with this change)

Original issue reported on code.google.com by kamil.paral on 2012-01-18 16:10:43

  • Labels added: Priority-Low

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Kamile, tímhle bys to mohl vyřešit:

http://browserlaunch2.sourceforge.net/

Original issue reported on code.google.com by [email protected] on 2012-06-20 09:34:16

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Dobrý den,

pokusím se vyřešit tento problém.

S pozdravem Pavel Žák

Original issue reported on code.google.com by 16pazak7 on 2014-03-14 21:40:46

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Problém budu řešit výše uvedeným způsobem - vyskakovacím dialogem, konkrétně uvažuji
o JOptionPane.showConfirmDialog, zobrazí se v něm tlačítko ano a ne, které bych využil
pro zkopírování odkazu do schránky. Máte jiný návrh?

S pozdravem
Pavel Žák

Original issue reported on code.google.com by 16pazak7 on 2014-05-13 06:48:26

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Na kopírování do schránky bych nespoléhal (může to nefungovat stejně jako otvírání prohlížeče).
Otevřel bych obyčejný dialog (s jediným tlačítkem OK nebo Zavřít), kde by byla adresa
v textovém poli, takže by šla jednoduše označit a zkopírovat do schránky ručně (samozřejmě
může být už automaticky označená a focus může být v poli, takže stačí stisknout ctrl₊c
a pak enter/esc).

Original issue reported on code.google.com by kamil.paral on 2014-05-13 07:59:17

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant