Not supported platforms for java.awt.Desktop.getDesktop()
Asked Answered
P

6

20

Since Java 6 there is a class java.awt.Desktop. There are some nice methods but the class is not supported on all platforms. The methods java.awt.Desktop.getDesktop() throws an

java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform

on some platforms. Or the method java.awt.Desktop.isDesktopSupported() return false.

I know that it work on Windows XP, Windows 2003 and also Windows Vista. The question is on which platform is it not supported?

Pluralize answered 19/9, 2008 at 14:34 Comment(0)
M
9

Quote:

Desktop API was developed to support Windows and Gnome only

from https://bugs.java.com/bugdatabase/view_bug?bug_id=6486393

This article however says that even Gnome support is flawed on Fedora.

Marlysmarmaduke answered 19/9, 2008 at 15:9 Comment(1)
Are you aware if there are plans to port this functionality to other OS ?Pya
W
3

Works on OS X, too.

Witmer answered 18/11, 2010 at 16:8 Comment(1)
Doesnt work with Mac / OS X. Which version have you checked it with ?Brod
T
3

Does not work in the current Debian (squeeze) whether in gnome or fvwm. I did not try kde.

This bug prevents the latest version of limewire to start. The stack output is:

FATAL ERROR!

java.lang.ExceptionInInitializerError at com.limegroup.gnutella.gui.Initializer$6.run(Unknown Source)

.......

Caused by: java.lang.UnsupportedOperationException: The system tray is not supported on the current platform. at java.awt.SystemTray.getSystemTray(SystemTray.java:151)

Turmoil answered 29/4, 2011 at 10:27 Comment(1)
I'm having trouble with Ubuntu 11.10 & Gnome Classic / Gnome3 too, using both openjdk-6 & openjdk-7..Aurify
S
2

Well its not Supported into the Ubuntu 12.04 and its giving Error like this.

java.lang.UnsupportedOperationException: The system tray is not supported on the current platform.
Sparrowgrass answered 23/10, 2013 at 9:18 Comment(0)
S
2

to solve it on ubuntu, run the next command:

apt-get install libgnome2-0
Sulfurous answered 7/5, 2014 at 11:0 Comment(0)
H
-1

On arch linux, I had to install the AUR libgnome package

Hebbel answered 20/4, 2017 at 6:40 Comment(1)
This didn't work for me unfortunately.Zinovievsk

© 2022 - 2024 — McMap. All rights reserved.