Building Kaffe with GTK AWT

Marc Haisenko marc.haisenko at software-for-people.com
Mon Apr 15 08:05:12 PDT 2002


On Monday 15 April 2002 03:10, Jim Pick wrote:
> On Fri, Apr 12, 2002 at 05:15:10PM +0200, Marc Haisenko wrote:
> > Hi folks,
> > 	I'm developing a STB using Linux on which we run a Java AWT app.
>
> Cool.  I wouldn't mind talking to you about KaffePro then, since
> that's looking like it's going to be our target market, primarily.
> We're just in the initial stages of defining what we're going to do to
> the product, and I wouldn't mind some feedback.

Uhm, sorry, I'm not a native english speaker, do you mean you want or don't 
want to talk about KaffePro ? :-) And what is KaffePro ?

> > Because of
> > space saving issues we'd like to get rid of X Window and use the
> > framebuffer instead. Now, GTK can be compiled to use the FB instead of X,
> > and I've read that Kaffe can be compiled to use GTK as the underlying
> > layering for AWT, thus making Kaffe able to run Java AWT apps on the
> > framebuffer.
>
> Transvirtual released a lightweight AWT called no-native-wm (plus a
> framebuffer graphics library called fgl) with the PocketLinux stuff.
> You can dig it out of the tarball here:
>
>   http://www.kaffe.org/ftp/pub/packages/pocketlinux/
>
> Of course, it's already somewhat dated and completely unsupported, and
> don't expect Transvirtual to be updating or bugfixing it in the future
> (although other people are free to build on top of the GPL'd code).

I've looked into it, and I don't like it ;-) Especially the 
no-longer-supported character of it.

> Now I'll plug my employer -- If you want something newer, and you
> don't mind proprietary, Transvirtual is offering an updated, well
> supported, proprietary framebuffer AWT + graphics library called XGL.
> It runs on more JVMs than just KaffePro (eg. the ones from Sun, IBM).
> There's some info about it on transvirtual.com.  Our graphics
> department guys are working on acceleration support too.  I can put
> you in touch with the right guys to talk to if you are interested.

Good to know, thnx. This would be the backup solution if everything else 
fails, but because of money issues we'd like to have an open source solution 
:-)

> In another email, there was mention of a free framebuffer AWT that
> comes with Wonka.

I'm currently trying to compile this and it looks somewhat promissing. But the 
use of exotic software (JAM instead of make, needs jikes in version 1.12, 
newer versions don't work) makes it a little adventurous to build ;-) But 
this would be exactly what we need since it supports an AWT for the 
framebuffer without the GTK-detour. This saves a lot of ressources.

> Also, I know the Microwindows people got kaffe working with their
> framebuffer library (I'm not sure if they used the Win32 widgets or
> the X11 widgets as their base).
>
> Does anybody know of any other free framebuffer AWT implementations?
>
> There are some pretty cool base graphics libraries out there that look
> nice (DirectFB, PicoGUI).  Some of those could be bound to
> no-native-wm, I guess, but somebody would have to do the work.
>
> There are some really small X servers that can be used.  Just to give
> you an idea of how small the X protocol can be - I personally use
> WeirdX (a X server written in Java) on my Windows laptop (I'm using it
> to write this), and it's only 150k.  Of course, that doesn't handle
> the underlying graphics primitives and fonts, just the X protocol, and
> not many of the extensions.  The handhelds.org people have a cut-down
> xfree86-based X server that runs on the iPAQ.  Running X is a little
> extra overhead (say, 1MB, excluding fonts, which you need anyway), and
> is a bit klunkier and slower to boot -- but it does give you a bit of
> extra flexibility too.  A straight-to-the-framebuffer implementation
> such as XGL probably weighs in at about 75k (excluding fonts), but
> it's a little less flexible than X11, and all your native graphics
> bits (eg. video players, Macromedia Flash players) need to be ported.
> It's the standard type of tradeoff you get in embedded work - extra
> development time up-front vs. extra production costs down the road.

Since we make use of the Geode plattform (http://www.linux4.tv) all our native 
graphic code makes use of the framebuffer (video playback is done via an 
overlay). Our solution so far was XFree86 4.0.1 using the framebuffer driver, 
and we needed X-Window only to run Java which is an unneeded overhead, IMHO. 
So the use of a smaller/faster/whatever X implementation doesn't make this 
solution better because we do not make use of X's network capabilities or 
something.

> > My problem is, I can't find any instructions on how to actually compile
> > Kaffe to use GTK instead of X. I've downloaded and untarred Kaffe 1.0.6
> > and gtkawt.tar.gz, copied the content into the Kaffe source tree and am
> > now puzzled with how to go on. There seems to be no switch in the
> > configure script and there seems to be not a single document about this,
> > not in the source, not on the Kaffe web site and according to Google not
> > on the net at all.
> >
> > So, can somebody give me the needed hints ? Or is the GTK AWT dead ? If
> > so, does someone know of an alternative to get an AWT for the Linux
> > framebuffer ?
>
> I don't think anybody is using it.  I notice that there is also a GTK
> AWT in the PocketLinux kaffe sources that were released.  It might be
> same one...

OK, so this means the GTK AWT is not really supported by the Kaffe team ?

> I know the Trolltech guys are also selling a Qt AWT - I'm not sure if
> it is available under the GPL or not.  Does anybody know?  Someday,
> I'm going to phone them up and ask.  :-)
>
> Classpath has a free AWT project too, but I think it's X11 only.  I
> think Red Hat/Cygnus might also have been doing one, but I think they
> are merging with Classpath now.

According from their homepage it seems as if they are working on a GTK+ AWT, 
too, but they state that it doesn't work out of the box right now.

> Once we get into full blown development mode, I'd like to collect as
> many of the AWT implementations together as I can, and make them
> selectable at configuration or run time.  I'm sure some of them are
> going to be essentially "dead" (eg. BISS AWT), but there's no harm in
> making them available.  The main one I'm going to support (for
> kaffe.org) is going to be the X11 one, and maybe the Win32 one.
> Perhaps we'll make the switch to the Classpath one if theirs turns out
> to be better.

Maybe you could do something like Wonka's AWT ? They essentially seem to have 
implemented an AWT which uses the framebuffer and then wrote a small 
"simulator" to run in X. I think the most portable solution would be a 
generic AWT and then to write a kind of frontend which maps the primitive 
graphic operations. But I guess this wouldn't be as easy as it sounds, 
especially when it comes to performance.

> Cheers,
>
>  - Jim

C'ya,
	Marc


-- 
Marc Haisenko
Development
Software for People AG
Münchner Str. 45
Germany - 82131 Gauting
mailto: marc.haisenko at software-for-people.com
mailto: axl at cu-muc.de


More information about the kaffe mailing list