Java-GNOME is a set of java bindings for the GNOME and GTK libraries so GNOME applications can be written in Java. The bindings are implemented via a JNI layer that accesses the native libraries. After many months, version 0.8 is released, which adds support for GTK+ 2.x and GNOME 2.x.
I agree with Ximian CEO, Miguel De Icaza to a certain extent about the need for GTK+ apps to be written in a language other than C. An OO language, one that uses references instead of pointers and one with garbage collection. Java, C# and python are the first that come to mind.
Python is nice, but it lacks proper compiled code. Yes, I know that you can compile python code but it is not an upward compatible binary like C# and Java produce. My next point is hard to concede because I’ve used python for a number of projects, most which have succeeded as planned but… Python lacks the features needed for large projects. It allows the programmer too much flexibility. Awesome however, for small projects. Also, threading is, despite what some people say, not yet well refined enough. Despite this, many large companies (NASA, RedHat – just look at their installer and configuration apps, IBM and ActiveState) have benefitted intensely from python (AFAIK).
C# and Mono (.NET) as we all know is being backed by Miguel as the successor to C in writing GNOME apps. To begin with, C#’s runtime environment doesn’t have an exception handling mechanism as good as that in Java (IMHO). Also, it’s security features aren’t in the same leage. Quite frankly, the concept of adopting C# as the successor scares me. Do we really want this MSIL code running on our open source desktop? I think not. Already, we can see how Linus has gotten into trouble by maintaining a kernel that “supposedly” has unoriginal, SCO derived code. I hate to think the storm Microsoft could whip up if they used SCO as a role model for how they should conduct their business.
Java on the otherhand has other things going for it. It’s open, standards driven and free (speech, not beer) with things like JCP and transparent code. The 1.4.2 release really demonstrates Sun’s committment to bringing Java to the masses on the desktop (IMHO). The performance troubles of the past will be no more. Also, it has been proven to excel in large projects. Security is of little concearn. Java’s execution environment is one of the most mature and advanced in it’s field.
However, the two most important factors I believe are Java’s portability (yes I know .NET has this already but who can trust them to keep it that way) and Java’s open approach to standards. Other JVMs from places like IBM and the Kaffe group already exist. All non-sun JVMs don’t have any disadvantages in specificational knowledge the way mono and dotGNU do.
Of course, Java is not without flaws. Swing doesn’t integrate very well into desktop environments and isn’t hugely quick either (helped by JDK1.4.2). JavaGNOME fixes both of these problems with the one stone.
“The 1.4.2 release really demonstrates Sun’s committment to bringing Java to the masses on the desktop (IMHO). The performance troubles of the past will be no more.”
I just installed this a few days ago and it seems to run substantially faster than 1.4.1, which I found to be quite slow (compared to MSFT’s implementation) but stable. The earlier versions of J2SE (1.3.x) were so unstable that they caused frequent IE crashes and I had to abandon them.
I think Sun has been making some decent progress with Java lately and I am starting to become less uptight about working with it.
I don’t use GNOME, so I’m not sure what this is. Is this a Swing look and feel? Or is this a totally different set of widgets, and I need to recode in order to use? How is this different from the GTK theme in Java 1.4.2?
> I don’t use GNOME, so I’m not sure what this is. Is this a
> Swing look and feel? Or is this a totally different set of
> widgets, and I need to recode in order to use? How is this
> different from the GTK theme in Java 1.4.2?
No, this isn’t just a theme. It is a java wrapper of the GTK+ libs. It has it’s own unique API but uses similar methods to GTK+. The three main advantages of JavaGNOME over swing are improved desktop integration, native theming support (Swing doesn’t yet support all GTK themes) and improved speed.
Swing still has an edge over JavaGNOME for portability.
Short answer: no.
A Swing theme is implemented on all platforms that fully support Java Standard/Enterprise Edition. This, however, is something that provides a Java programmer with the ability to call GTK _natively_ i.e. perform system calls to the GTK library.
In other words, it requires a GTK library to be present, whereas the Swing theme doesn’t. That said, native calls tend to be faster and more “accurate” (in the sense that you get “true” GTK look and feel) than using a Swing theme, but on the other hand you lose the portability.
As I see it, the main advantage of Java is that it is portable. By binding Gnome to Java, you lose the portability to a platform like Windows, which can be quite a disadvantage.
The advantage of this project, as I see it, is that it makes it possible to write applications that should work on any Unix-like system on any architecture without recompiling. But then, the Sun JVM does not support very very much platforms 🙁
The website still talks about the old gnome 1.4 bindings? The screenshots seem to show old gnome/gtk 1.4 apps. What’s going on here?
> But then, the Sun JVM does not support very very much
> platforms 🙁
Agreed, it’d be nice to see a list of supported platforms that looks a little more like http://www.rebol.com/view-platforms.shtml or even http://www.rebol.com/platforms.shtml
That said, I mostly miss Java for *BSD and the fact that Sun’s JVM more or less only supports x86 and Sparc. Still, does it make sense, business-wise, for Sun to support “competing” Unices such as *BSD, AIX etc. There’s always the possibility of writing your own JVM like IBM did.
We are currently updating the website. If you wish to
download the bindings now you can go to the sourceforge
project page.
“Java on the otherhand has other things going for it. It’s open, standards driven and free (speech, not beer) with things like JCP and transparent code.”
The JCP is nice, but I wouldn’t call Java standard driven in the since of C++, or C# even.
However, with one company controlling the process and doing to the certifcation, there is much less chance of incompatible, non compliant implementations.
“C#’s runtime environment doesn’t have an exception handling mechanism as good as that in Java (IMHO).”
The only difference is that Java has Checked exceptions. It’s the only language that I’m away of that does have checked exceptions.
Don’t get me wrong though, I prefer Java’s checked exception model, but C# has some advantages over Java.
” Do we really want this MSIL code running on our open source desktop? I think not.”
I don’t think you have to worry about this. Microsoft hasn’t released their .NET code to anyone besides that shared source release for FreeBSD. And that release was written from scratch supposedly. And what is wrong with MSIL. It is a language. It has support for many more things than Java Bytecode such as generics.
I code Java all day. I think it’s one of the best things since sliced bread. But I do see advantages in C#/.NET that may be approriate for certain situations.
>>>Matthew Baulch: “Yes, I know that you can compile python code but it is not an upward compatible binary like C# and Java produce.”
Would you please explain this statement?
>>>Matthew Baulch: “Python lacks the features needed for large projects. It allows the programmer too much flexibility.”
What features did you have in mind? Could you back up your claim, that Python offers too much flexibility? How is it *too* much?
>>>Matthew Baulch: “Already, we can see how Linus has gotten into trouble by maintaining a kernel that “supposedly” has unoriginal, SCO derived code.”
I don’t see how Linus got troubled. It’s a SCO vs. IBM case. No real facts are available so far.
>>>Matthew Baulch: “Java’s execution environment is one of the most mature and advanced in it’s field.”
“mature” maybe but “advanced” certainly not.
> And what is wrong with MSIL. It is a language. It has
> support for many more things than Java Bytecode such as
> generics.
For starters it is patented by Microsoft AFAIK. Anyway despite this, they could probably take Ximian and Mono developers in SCO fashion and cause chaos while spreading FUD.
Also, I see no reason why Microsoft won’t add hidden proprietary extensions to the CLI standard in a much similar way to their abusing of Kerberos and TCP/IP.
> I code Java all day. I think it’s one of the best things
> since sliced bread. But I do see advantages in C#/.NET that
> may be approriate for certain situations.
I assume what you’re saying is “the right tool for the right job” and I totally agree with you. I’m sure C#/.NET can be useful in certain situations more so than Java.
>> Matthew Baulch: “Yes, I know that you can compile python
>> code but it is not an upward compatible binary like C#
>> and Java produce.”
>Would you please explain this statement?
Of course. What I’m saying is that in a number of instances, python code compiled from a previous version of the runtime environment. This isn’t a problem with open source code that can easily be recompiled from source but commercial code that comes in binary form will become useless when incompatible versions of the RTE are released.
>> Matthew Baulch: “Python lacks the features needed for
>> large projects. It allows the programmer too much
>> flexibility.”
> What features did you have in mind? Could you back up your
> claim, that Python offers too much flexibility? How is it
> *too* much?
>> Matthew Baulch: “Already, we can see how Linus has gotten
>> into trouble by maintaining a kernel that “supposedly”
>> has unoriginal, SCO derived code.”
> I don’t see how Linus got troubled. It’s a SCO vs. IBM
> case. No real facts are available so far.
I’m definitely not saying that I believe SCO have any major facts. Quite the contrary. Despite this, SCO have succeeded in stirring up the OSS community and to a greater extend the Linux community. For example, you may have read on slashdot recently about a New Zealand CD replicating company who refused to copy a Linux distro in light of the SCO vs. IBM legal case. Also, Sun have been cashing in on these events as an opportunity to woo AIX and Linux users to their platform, creating a virtual safe-haven for *nix users concearned about the future of their products.
As you can see, these events and many others have quite plainly been bad publicity for Linux, hence Linus. SCO’s hollow attempt to sue the man himself was also considered. I have no doubt that at some point, Linus must have had a rush of blood to the head.
>> Matthew Baulch: “Java’s execution environment is one of
>> the most mature and advanced in it’s field.”
> “mature” maybe but “advanced” certainly not.
This is a subjective opinion and one that many people will agree with me on. Just google for it:
http://www.google.com.au/search?q=java+advanced+security+model&ie=U…
Isn’t there a gtk look and feel for java? So what’s the use of a gtk binding?
What’s the advantage of this over SWT (using Gtk2)? The SWT is portable, at least between Linux and Windows.
> Isn’t there a gtk look and feel for java? So what’s the use
> of a gtk binding?
The use of these bindings (as clearly stated above) is to allow better desktop integration with GNOME, native themes and improved performance (over swing).
> What’s the advantage of this over SWT (using Gtk2)? The SWT
> is portable, at least between Linux and Windows.
I’m not personally familiar with SWT (that’s IBMs GUI Toolkit right?) but I know JavaGNOME to perform well at the above things.
From the Mono FAQ (About the patents on the Mono core):
> The core of the .NET Framework, and what has been patented by
> Microsoft falls under the ECMA/ISO submission. Jim Miller at
> Microsoft has made a statement on the patents covering ISO/ECMA,
> (he is one of the inventors listed in the patent): <a
> href=”https://mailserver.di.unipi.it/pipermail/dotnet-sscli/msg00218.html“….
So the ECMA core is patent free.
Speaking of SCO: Noticed that that Sun has plenty of patents over the Java bytecodes? Noticed that Sun is already using the SCO FUD to advertise Solaris?
Sun is not playing is “be nice to open source” card. It only plays it when it is convenient to do so.
So from where I stand, the .NET bytecodes are a lot safer to use than Java bytecodes.
If anything, the existance of a patent-free (.NET bytecodes) will keep Sun under a leash.
Well, as I see it, eclipse.orgs SWT really has a huge advantage here, as it is mature (version 2.1, seems the authors trust their work more than a 0.8) and already portable to win32 (and Linux/GTK, Linux/Motif, Solaris/Motif, QNX/Photon, AIX/Motif, HPUX/Motif MacOSX/Carbon) with native look and feel. But as always, everyone has the right to feel just as they please.
ok, AFAIK there is a GTK+ for windows, so if you used JavaGNOME, would this be portable to windows? If yes, then, binary compatible, or source compatible? And more importantly, would this be faster?
> ok, AFAIK there is a GTK+ for windows, so if you used
> JavaGNOME, would this be portable to windows? If yes, then,
> binary compatible, or source compatible? And more
> importantly, would this be faster?
This is true except the only version of this that even comes close to being stable is the old 1.3.x series. GTK2 support is on the way AFAIK but neither work reliably except under cygwin.