Horcrux7
Horcrux7

Reputation: 24447

Not supported platforms for java.awt.Desktop.getDesktop()

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?

Upvotes: 20

Views: 12140

Answers (6)

lsund
lsund

Reputation: 744

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

Upvotes: -1

Carlos
Carlos

Reputation: 49

to solve it on ubuntu, run the next command:

apt-get install libgnome2-0

Upvotes: 2

Kishan Bheemajiyani
Kishan Bheemajiyani

Reputation: 3439

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.

Upvotes: 2

Nick
Nick

Reputation: 31

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)

Upvotes: 3

Mot
Mot

Reputation: 29570

Works on OS X, too.

Upvotes: 3

Ilya Kochetov
Ilya Kochetov

Reputation: 18453

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.

Upvotes: 10

Related Questions