Steve Jobs is sooo wrong

Recently in an interview with the New York Times Steve Jobs said that the iPhone will not ship with Java due the Java ME implementation being too large and that no one is using it anymore. My reaction to that might not be an outrage, but at least a bit upset as Mr. Jobs is somewhat influencal, at least among his fellow CEO:s and upper management in some large corporations. Some years ago Steve Jobs claimed dusing his keynote at the JavaOne conference that the Apple Macintosh would soon become the best environment for Java development. I know, I was there. Well, did we see anything in that direction? Big words, but no action in the end ...

Among the Java community it is probably frowned upon and seen as yet another statement by the Apple CEO. Eric Bruno at DDJ captures it quite well in his blog-entry. In his blog he mentions Google using a Java based client for its mobile email clients, etc. I would like to add another powerful, and very useful, application to the list; Opera Mini. Or click on "mini.opera.com" if you are reading this from your mobile device.

Opera Mini is a Java application that in part is installed on your phone, or whatever mobile device you've got. The other part resides on Opera's server, i.e. the installation is optimised by running some tests when you use it for the first time. The server-browser combintaion will compress the pages, the images in particular, you are browsing in a for your device optimised way. I have been using it for a while now and I see that surfing is way quicker using the Opera Mini browser than the browser bundled with the device.

So there are useful applications made in Java that are effecient on mobile devices. As we also have seen in the Java SE world Java is in a way becoming the language of choice for systems programming. Languages like JRuby are produced this way. I wonder how long it will be before we start see this development on mobile devices as well?

And, by the way, there are people around that require mobile devices to fully support Java. See Ove's blog-entry where he actually comments on the iPhone and its need to have Java ME bundled. So Steve, I think you will have to reconsider. Nothing wrong with that, just accept that there is a community out there. You should not let them down...


JavaOne 2007

This year's conference I'll relax and enjoy as many interesting presentations as possible. Myself, and some friends and collegues, submitted a number of papers. As I had a BOF last year I would appereciate holding another this year. Despite the effort required, it is quite fun presenting at a venue as JavaOne. You tend to meet numerous intersting people with bright ideas.

Anyhow, the relax part; none of the submissions this year was accepted. Thus there will be no repesnting this year, less effort as well, but none the less, it will be great fun. Last year I missed a few talks due to some admin around the BOF we, Anders - a friend and collegue who also was co-speaker, held.

After registering I got the usual prompt for adding myself to the Event Connect tool. I do have an account there, but as I've lost my password, I had to re-register - with a new account name (!). Anyhow, this time I've started a OSGi gathering group, so if you would like to meet and discuss OSGi during JavaOne, sign for the "OSGi at JavaOne" group. Just follow the link and you should end up in the group's homepage.


Writing to the statusbar in Eclipse from a non-UI thread

If you are dealing with the UI in Eclispe and need access to a certian part, e.g. the Statusbar in this case, it is quite easily achieved. On the other hand if you would like to simply write a message to this afore mentioned status bar, it is a whole new deal. You wrie your code that in the end extracts the site in question. As you get hold of the current statusline manager from the site, this is the way to go. Or,..?. well, when you start to debug the code you find that you run into NullPointerExceptions. The site or its view parts are null. This happens if certain methods in e.g. JFace is called from a non-UI thread. It actually says so in the Javadoc, in some places. I.e. the getActiveWorkbenchWindow method in IWorkbench exposes this behaviour.

If you are to produce code that calls these methods but does not have a UI-thread available? Well, then we can create one. It is quite simple once you've got the hang of it. It might look a bit complicated at first as it comprises using an anonymous inner class (which is a bit of favorite of mine as they resemble, to some extent, closures - without being it - ok, let the comments come!). Below is a code snippet that will produce a message on the status line:

final Display display = Display.getDefault();

new Thread() {

public void run() {

display.syncExec(new Runnable() {
* (non-Javadoc)
* @see java.lang.Runnable#run()
public void run() {

IWorkbench wb = PlatformUI.getWorkbench();
IWorkbenchWindow win = wb.getActiveWorkbenchWindow();

IWorkbenchPage page = win.getActivePage();

IWorkbenchPart part = page.getActivePart();
IWorkbenchPartSite site = part.getSite();

IViewSite vSite = ( IViewSite ) site;

IActionBars actionBars = vSite.getActionBars();

if( actionBars == null )
return ;

IStatusLineManager statusLineManager =

if( statusLineManager == null )
return ;

statusLineManager.setMessage( message );

If you want to the clear the statusline, pass null as argument to the setMessage method. Too many method calls? I "chopped"them up a bit to make it clear. One does find code here and there in the open source community where the author has more or less kept the calls figuring out the site reference to one line.

There are few posts on EclipseZone about, or touching, the subject. One of the more intersting threads can be read here.


Operating systems and Java becoming a "machine" language

There is a quite intersting article from Information Week on operating systems and where they are heading. In it there is a reference to BEA cutting out the opertaing system and letting the JVM talk direclty to the hardware. So what is the operating system in that case? One could argue that without it, the JVM itself is what comes closest to be an OS, or something like it.

Anyway I do see some movement in the direction of Java becoming the "machine language", i.e. the language and runtime system for programs written in other languages. To be more precise; the other language is implemented in Java. John Rose at Sun has an intersting blog entry on duck typing, and the implication of using Java as a "system implementation language" of the JVM.

What languages implemented in Java are there? Well, the one I first thought about is JRuby. But there are also; Jython, JavaScript, Groovy, etc. There are of course many many more, see "Programming Languages for the Java Virtual Machine" site for an assortment. And while at it, why not devise a language of your own by defining a grammar for it to start by using the ANTLR parser generator, then just add some .... There are some initial experiments in this area to make an Io implementation in Java. Ola Bini has created a lexer using just ANTLR. Neat!

If you are interested in deeper discussions regarding JRuby, check out Ola Bini's blog. He is one of the principal developers working on the JRuby implementation.


Eclipse Pluginfest, Jfokus and speaking

It has gone two weeks now since the Eclipse Pluginfest in London. Time flies! There are some imagery from the event on the event Wiki.
I had an ambition to do some kind of reporting from the venue. But, we where very tied up in the exciting activities going on, and Adrian Taylor of Macrobug covered the event well. So check out his posts for day one and two. As the plug-in suite we brought with us to the fest are internal to my customer, so I cannot reveal to much of what went on regarding those. But, I can mention some intersting findings like the integration with IBM Rational Software Developer; it took some time to install (45 mins, a large number of plug-ins in our Eclipse 3.2 installation required to be updated) but proved to be an intersting tool. It does however resemble Borland's Together Architect, including model - code synchronisation. We will scrutinize this tool a bit further. It might be a candidate for replacing Together Architect ...

Further, there was a number of other interesting tools and prodcuts tried out together. We took a peek at the tool provided by Macrobug and some pre-view stuff from Symbian. All looks promising. The project manager for CDT, Dough Schaffer, told us about what is in the pipe. Another Doug, Doug Gaff from WindRiver, had an update on DSDP, Device Software Development Platform, and Mobile Tools for Java, MTJ. Two projects to keep a close eye on.

Last week the first Java conference in the Stockholm area took off; Jfokus. It is a joint "venture", sponserd, by Ciber, Sun Microsystems, SICS, IBS, JayWay, et. al. It has, had, four tracks and telling from the interest this might be increased next time. Speaking of interest, when the number of attendees rose past what the booked rooms could handle they had to close the registration site. The goal was to reach circa 300 attendees, when the registration site closed the number had reached 470!

Anyhow, I was asked early on if I could say something about OSGi, a technology I have been working with daily for some time now. The problem faced was a bit complicated; how much "introduction" should there be? Some people just wants to know what it is, whereas others would like to know how to employ it effieciently. Well, I kept to an introductory talk this time and time permitting there could be a quick demo. It turned out that most people probably knew quite a lot about OSGi, most of them probably knows far more about it than myself, and would have liked to see more practical stuff. And the demo? I had to fire up Eclipse as I hadn't planned for it. So there was a looooong delay before it came up (I am talking to my boss regarding a new laptop!). Did basically a reduced version of what me and Anders showed at JavaForum last year.

Lesson learned; fire up the IDE in the background just in case. If that eats to much memory - nag your boss once again. Also, we've probably had enough intros to OSGi now, next time there will something more practical with more code! The technology has really taken off lately, more and more people know about it today.

Another lesson, and a good one for that matter, is that prior to my little presentation I took some voice lessons. It has helped alot! A former collegue approached me after the presentation and informed me that I was very clear(!). That was great news! Seemingly my practicing has had some effect. Taking these lesson is quite fun as there has been a great deal of progress now when I in the beginning of the process. Also, I do realise that there is much much more that needs to be done in this area. So I am looking forward to more sessions of learning how to get in control of my voice ... Well, maybe someday I will be able to speak properly ...
I can reveal who is helping me with this; it is a very taleneted singer, soprano and artist. She has an alternate site also.