Skip to main content

Alternative to xlets

4 replies [Last post]
Joined: 2007-01-05

I have a quandry. I'm building CDC on a platform with no framebuffer, and thus no GUI. I want some form of single VM application managment, like xlets. Xlets require basis, basis requires AWT and a GUI.

My first approach was to make a headless system have a GUI toolkit I just would not use. I built phoneME advanced basis with QTE. Attempts to make QT work on this platform fail since, with no framebuffer, QT will exit immediately, causing cvm to exit.

I've decided to try an alternative approach and find another application manager, similar to the xletManager. Everything I have found from jsh to echidna require awt. Is there any application manager out there that works with out awt?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-11-08

Hi glachac,

I believe another approach you can take is to build a headless PBP, so that you can run xlet management code without being required to support GUI. Take a look at javaSE's java.awt.GraphicsEnvironment.isHeadless() API to get an idea.

The bad news is that PBP doesn't support the headless mode right now, so you'd have to be changing some code. The good news is that it's not that hard. Here are the steps.

1) In src/share/basis/classes/common/java/awt/Graphics/ change isHeadless() to return true instead of false.

2) In the same directory,, update Window(GC) constructor to do this on the first line:

Window(GraphicsConfiguration gc) {

if (GraphicsEnvironment.isHeadless())
throw new HeadlessException();

3) In com.sun.xlet.XletManager and com.sun.xlet.XletContext, you have to put a throw-catch for XletFrame construction (since it'll throw HeadlessException), and make sure that getContainer() methods in two files throw back UnavailableContainerException in the headless case.

4) Add two empty files, and in build/share directory.

5) Build with


There are more things that has to be done to make the headless PBP specification compliant, but I think this would get you going. If you want to contribute this back to the open source, I'd be happy to work with you.

Best regards,

Joined: 2007-01-05


Thanks for the input. I might go that route, but I'm going to investigate the OSGi path first. The OSGi option has some intriguing features in its framework that would save me some time. (Thanks to everyone else for the suggestion)

If I do go down the road of modifying the code to work as headless, I'll check back with you.


Joined: 2005-06-16

OSGi should not require a UI. You might be lucky and find an open source OSGi implementation which runs on JDK 1.4 and hence stands some chance of running on FP 1.1.

Joined: 2006-09-13

I believe the Apache Felix OSGi framework works on Java 1.3 and later.