Closed bflorat closed 9 years ago
Commented by einhard on 11 Jun 2010 17:48 UTC I get rid of "[ERROR] DBus not available" by copying libunix-java.so from jajuk install directory to my jre lib folder /opt/java/jre/lib/amd64/.
Other error is probably related to lack of KDE support in java.awt.Desktop class. On my platform (KDE4) isBrowserSupported returns true where i think it should false.
I forgot to mention: java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
Commented by bflorat on 11 Jun 2010 19:55 UTC Yep, this is a Sun bug, see #1612 for more.
Commented by einhard on 11 Jun 2010 21:58 UTC I don't think it's the same issue as not openning external browser because Jajuk GUI doesn't launch thanks to this bug and i can't do anything. It's similar to crash although java process is still active. As I mentioned before version 1.8.4 works fine, so changes in org.jajuk.util.UtilSystem?.isBrowserSupported or some other workaround should help. Jajuk 1.9RC4 will probably crash on every KDE system from this bug.
Commented by einhard einhard7@gmail.com on 13 Jun 2010 23:10 UTC I checked code and adding one condition solves crash on KDE and Sun Java. isBrowserSupported should look like this:
public static boolean isBrowserSupported() { if (GraphicsEnvironment.isHeadless()) { return false; } else { if (Desktop.isDesktopSupported()) { return (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)); } else { return false; } } }
Commented by einhard einhard7@gmail.com on 13 Jun 2010 23:16 UTC
public static boolean isBrowserSupported() {
if (GraphicsEnvironment.isHeadless()) {
return false;
} else {
if (Desktop.isDesktopSupported()) {
return (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE));
} else {
return false;
}
}
}
Commented by bflorat on 14 Jun 2010 10:50 UTC All right, thx for the patch, I'll apply it along with another fix : We now handle properly KDE environments : thx aps command lookin for kdeinit, we now detect KDE desktops and we return false to isBrowserSupported.
Checked in against trunk.
Reported by einhard on 11 Jun 2010 08:33 UTC I used sources,jar installer, rpm package and got the same result. Version 1.8.4 works fine for me. My system: 64bit Arch Linux, KDE 4.4.4. My jre is in /opt/java/
Log: [_JAJUK_ INFO Version: 1.9RC4 2010/06/11 10:03:16 [---------------------------------------------------------------------------- main (Main.java:111) 2010/06/11 10:03:16 [Starting Jajuk 1.9RC4 Build: 2010/06/11 09:51 main (Main.java:112)
2010/06/11 10:03:16 [Register: "PARAMETERS_CHANGE" by: org.jajuk.ui.helpers.FontManager@e3a1ec6 main (ObservationManager.java:70)
java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform
at java.awt.Desktop.getDesktop(Desktop.java:126)
at org.jajuk.util.UtilSystem.isBrowserSupported(UtilSystem.java:1261)
at org.jajuk.ui.actions.ActionManager.(ActionManager.java:129)
at org.jajuk.ui.actions.ActionManager.getInstance(ActionManager.java:60)
at org.jajuk.services.startup.StartupGUIService$6.run(StartupGUIService.java:174)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2010/06/11 10:03:19 [(106) Uncaught exception AWT-EventQueue-0 (StartupGUIService.java:223)
java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform
at java.awt.Desktop.getDesktop(Desktop.java:126)
at org.jajuk.util.UtilSystem.isBrowserSupported(UtilSystem.java:1261)
at org.jajuk.ui.actions.ActionManager.(ActionManager.java:129)
at org.jajuk.ui.actions.ActionManager.getInstance(ActionManager.java:60)
at org.jajuk.services.startup.StartupGUIService$6.run(StartupGUIService.java:174)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2010/06/11 10:03:19 [DBus not available / java.lang.UnsatisfiedLinkError: no unix-java in java.library.path Startup Async After Collection Load Thread (StartupAsyncService.java:100)
java.lang.Exception: DBus not available
at org.jajuk.services.dbus.DBusManager.connect(DBusManager.java:51)
at org.jajuk.services.startup.StartupAsyncService$1.run(StartupAsyncService.java:96)
Caused by: java.lang.UnsatisfiedLinkError: no unix-java in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at cx.ath.matthew.unix.UnixSocket.(UnixSocket.java:33)
at org.freedesktop.dbus.Transport.connect(Unknown Source)
at org.freedesktop.dbus.Transport.(Unknown Source)
at org.freedesktop.dbus.DBusConnection.(Unknown Source)
at org.freedesktop.dbus.DBusConnection.getConnection(Unknown Source)
at org.jajuk.services.dbus.DBusSupportImpl.connect(DBusSupportImpl.java:90)
at org.jajuk.services.dbus.DBusManager.connect(DBusManager.java:48)