Log in

No account? Create an account
Why Java Sucks for Cross-Platform GUI - Shlomif's Technical Posts Community [entries|archive|friends|userinfo]
Shlomif's Technical Posts Community

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Links:| Shlomi Fish's Homepage Main Journal Homesite Blog Planet Linux-IL Amir Aharoni in Unicode open dot dot dot ]

Why Java Sucks for Cross-Platform GUI [Oct. 20th, 2012|12:49 pm]
Shlomif's Technical Posts Community


[Tags|, ]
[Current Location |Home]
[Current Mood |happyhappy]
[Current Music |The Wallflowers - One Headlight]

When the Java programming language first became publicised, it was heralded as the dawn of a new age of writing cross-platform programs. “Write once, run everywhere” they said. Now, 16 years after 1996, which was roughly when the Java hype started, I’d like to check if it delivered on this promise, by seeing if one can easily write a cross-platform GUI (= Graphical User-Interace) application using it. What I’m looking for is a Java GUI library that: 1. Compiles. 2. Is cross-platform. 3. Does not suck. Teaser: I was not able to find one.

The standard Java SWING toolkitis out-of-the-question due to its weird look and feel and crappy behaviour everywhere. Joel on Software has this to say about SWING:

If you still think that something as small as how long you hold down the Alt key when you activate a menu command doesn't matter, well, your software is going to make people unhappy. These tiny inconsistencies are what makes Swing applications so unbearably annoying to use, and in my opinion it's why there are virtually no commercially successful Java GUI applications.

(From the book reviews, there's more criticism of it in “Lord Palmerston on Programming”.)

I too have been frustrated by the unusable Java SWING GUIs, and in one of the latest projects I am contributing to, which has already been written in Java, I ran into a particularly buggy SWING UI.

The Eclipse people implemented something called SWT, but according to the wikipedia, it has several limitations, and require writing a lot of platform-dependent code.

Next are the Qt bindings to Java - Qt Jambi. These require customising the build.properties (whereas the error and documentation says one should edit the buildpath.properties file), and after that fails compiling with this error:

[make] ../../generator/out/cpp/com_trolltech_qt_core/
qtjambishell_QFutureIterator.cpp:21:15: error: no matching
function for call to ‘QFutureIterator::QFutureIterator()’

Next I looked into java-gnome, but apparently it does not work on Windows, so it's not cross-platform.

And the Java bindings for wxWidgets offer wxJava, which is Windows-only and unmaintained, and wx4j and jwx!, which are unmaintained and no longer build.

So I think that leaves us with nothing. How sad. Compare that to the comprehensive coverage of Mono’s GUI toolkits, many of which are cross-platform, and to the situation in other languages such as Perl or Python, and you'll see that Java sucks the most in this respect.


From: (Anonymous)
2012-10-20 05:26 pm (UTC)
BTW the commend above was mine (Artyom)
(Reply) (Thread)
[User Picture]From: shlomif
2012-10-20 05:42 pm (UTC)

Artyom, who?|

Artyom, who?

(Reply) (Parent) (Thread)