[Java-gnome-developer] Re: [Sablevm-developer] Re: [kaffe] Java-Gnome: jni or cni

Stephen Crawley crawley at dstc.edu.au
Sat Mar 13 08:03:02 PST 2004


Mark,

chris at kiffer.eunet.be said:
> On Thursday 11 March 2004 18:44, Mark Howard wrote:
> > The big question is: should we switch to CNI?
>
> No.

I agree with Chris 100%.  [Or perhaps I should say 110% :-)]

JNI is the standard for portably calling C / C++ from Java.  It works
well enough for the job.  Implementing CNI instead does your users a
major disservice by tying them to Java implementations that support
CNI.   

Actually, I reckon that the same argument applies to java-gnome in
general.  Anyone who uses the java-gnome libraries in a GUI-based Java
application is risking tying that application into GNOME.  By contrast,
if they use Swing or SWT, they can easily port the application across a
wide range of supported platforms.

[There is a counter-argument that says that java-gnome will maximise
integration with GNOME's look and feel, etc.  My counter to that is that
this is not the highest priority for most Java projects.  For most,
immediate portability or avoiding platform/vendor tie-in are equally, if
not more important.  Otherwise they'd probably be using .NET on a
Windows machine ;-)]

I'm assuming, without any evidence, that the java-gnome plans don't
include backends to graphics libraries other than the gtk/gnome ones. If
that's wrong, java-gnome is not quite so bad.  However, I still reckon
it would be risky to use java-gnome (instead of Swing or SWT) in a major
Java development project.  (For a start, the project would be screwed if
java-gnome faded away.)  IMO, this really leaves java-gnome as only being 
useful for minor Java applications for the GNOME platform.  At which 
point I would ask myself "why bother"?

I note your issues re JNI vs CNI performance, code size and ease of
development. I suggest that the first two issues will rarely much to the
end users of software that uses java-gnome.  The third issue will only
impact on the tiny group of people who develop and maintain java-gnome
itself.  Most developers should be working in the pure Java space.
[Think of it this way ... if Sun had perceived these to be major issues
for their customers, they would probably have replaced JNI by now!]

-- Steve



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
java-gnome-developer mailing list
java-gnome-developer at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/java-gnome-developer




More information about the kaffe mailing list