KDE vs Gnome and Java

I don’t want to quarrel about the pros and cons of each desktop. I think both are fine and we should stop whining at each other. However what I find a little disturbing is that applications typically are written for one or the other, but don’t work smooth on both. Evolution looks outlandish in KDE as does Konqueror in Gnome. That might not be a biggie for us techies, but a first time non-techie user would certainly be quite confused about the inconsistencies. So, can Java help us here and if so, then how?

Java has been designed from the beginning with platform independence in mind. I think it performs pretty well in this respect, arguably better than most alternative offerings so far. However, what is wasn’t made for is platform (desktop)-integration. Java has a bad reputation for beeing slightly out of place on most desktops. That’s even despite the fact that Java has one of the most flexible GUI toolkits, that actually _is_ designed to allow for platform integration via native look and feels. The problem so far has been that there was no really good native L&F until around JDK1.4 or JDK1.5. Only recently has the GTK L&F improved enough to be somewhat usable.

I’m thinking that when the native L&Fs get some more love, it would be possible to overcome the KDE vs Gnome (or whatever else) issue using Java and Swing. In Sun’s JDK (soon to be freed completely) we have a GTK L&F, which will become even better in future releases. Then there is a 3rd party KDE Look and Feel around, which is also looking pretty good even. So what we could see in the future is Swing applications always blending nicely with the user’s environment.

Let’s take for example a webbrowser. Say I’d beef up JGecko and wrap it up in a fully fledged web browser (which I would call ‘Firefrog’ for sure, a name I’d have proposed for Firebird back then, instead of Firefox). This would be started using the GTK L&F in Gnome, and thus would look just like any other Gnome app, especially when it could pick up the icon theme of Gnome. And when another user starts up the same app in KDE it would use the KDE L&F when this is installed. I think that barely any other toolkit can offer this kind of flexibility. Swing is really driving home here.

What’s needed for that is probably some kind of desktop detection and a means of choosing the correct L&F for that desktop (or fall back to Metal when none is found). I don’t know if that’s possible or if it makes sense at all. After all, a wrapper skript that appends the -Dswing.defaultlaf flag would do just as well.

And yes, I know that platform integration is more than GUI integration. I’m blatantly ignoring the other issues for now 😉 (and honestly, I think Java already offers good things in that area already, like CORBA, Webservices, XML etc).


About Roman Kennke
JVM Hacker, Principal Software Engineer at Red Hat's OpenJDK team, Shenandoah GC project lead, Java Champion

4 Responses to KDE vs Gnome and Java

  1. Tom says:

    I dont think the big problem is the look. There are already themes for both kde and gnome that look the same, as well as an icon themeing standard across both desktops.

    The biggest differenece is the design philosophy of applications. Core gnome applications tend to have much fewer toolbar icons for instance, and hence i believe the default is to have icons and text, whereas for kde the toolbar default is just icons, and there tend to be many (i havent properly used a kde desktop for a number of years, and this may not be true anymore, i dont know). This is just one example, but there are probably many in a similar vain. I would also suggest that gimp is an example of an application that uses gtk, but actually feels out of place on a gnome desktop (it is getting better in this regard, the last release is fantastic)

  2. roman says:

    I agree. That would be the ‘next level’ to overcome. Some things could be solved by Swing (for instance, common dialog design could be implemented by using JOptionPane), but yes, many design problems cannot be solved at the programming platform level at all.

  3. Tom Tromey says:

    I also think these developments are encouraging. I’m particularly interested in being able to use Java web start and also have a Gnome (or KDE… but historically I’m a Gnome user) L&F. I think this will fill a hole in the current deployment schemes.

  4. Paranoid says:

    may be better to request KDE-team support in this? KDE worth working…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: