Java, Equinox and EclipseRT on the Raspberry Pi

Java, Equinox and EclipseRT on the Raspberry Pi

Earlier this week I ordered a Raspberry Pi and it arrived today.


For those of you who haven’t heard of the Raspberry Pi, it’s a low cost computer that includes HDMI (1080p) output, USB, Ethernet, an ARM processor (700Mhz) and 512Mb (or 256Mb) of RAM. The entire computer is the size of a credit card (or an Ontario Fishing License if you prefer), and can be purchased for as little as $25 ($35 for the 512Mb version). The board also includes 26 pins, allowing you to connect it to all sorts of crazy hardware — treating the little computer more like an embedded controller.

Backing up a decade, OSGi (the underlying modularity system used for Eclipse) was originally designed for embedded systems such as set-top boxes. The EclipseRT (Runtime Project) extended this work by bringing high quality runtime components to this programming model. EclipseRT includes components such as: a powerful webserver (Jetty), a provisioning platform (p2), persistence technology (EclipseLink), a rich widget toolkit for Ajax based applications (RAP), and more. The idea that you could create a full software stack based on Eclipse and deploy it on a stick has been on our minds for years, but a we lacked a low cost (and generally available) computing platform to deploy it too. With a Raspberry Pi in hand, I decided to revisit this vision.

The Setup

To get started, you need an OS and a JVM. There is a Debian based distribution for the Raspberry Pi (Raspbian) and Oracle has a JVM for the ARM processor. Unfortunately the most common setup doesn’t work. The Oracle JVM does not support the hard-float ABI used by Raspbian. Lucky for us, there is a Raspbain image that supports soft-float ABI. Download this image and write it to an SD card (there are several good tutorials out there on how to do this). Once the image is on the card, you can start your Pi and install the JVM.

Screen Shot 2013-05-01 at 9.01.16 PM
 The RT Stack

The application I used was a simple web based mail client that leverages RAP (for the widgets) Jetty (for the webserver), Apache Felix Gogo shell, and Equinox. The entire application was designed as an  ‘Eclipse Product’ and built with Tycho. Because Raspberry Pi is not a supported architecture, we targeted Linux/x86 (knowing full well that no native libraries would work). Once the build was completed, the product was copied to the Pi.

Screen Shot 2013-05-01 at 9.12.07 PM
The Launch

The launchers that you get when you build a product are native, that is, binary executables for the particular platform. Because Raspberry Pi is not a support platform (yet), you cannot use the native launcher. Instead, you need to start your product by invoking Java and specifying the launcher jar.

Screen Shot 2013-05-01 at 9.23.23 PM

 The Result

With the runtime stack and mail application running on the Raspberry Pi, testing the setup is as simple as navigating to the Pi with a web browser.

Screen Shot 2013-05-01 at 9.25.54 PM

While this is just an example, it does show that you can get a non-trivial OSGi application (46 bundles) running on a Raspberry Pi without much work. It also opens the door to a large collection of Eclipse based runtimes (including the modelling technologies, ECF and more) running on the Pi. Having the EclipseRT projects running on a Pi is a great addition to the other M2M (Machine-to-Machine) work that is happening at

For more information on what I’m doing with Eclipse, Equinox, p2 and the Raspberry Pi, feel free to follow me on Twitter (@irbull).

  • Kai Tödter
    Posted at 9:46 am, May 2, 2013

    Thx Ian, great blog! I think I want a Raspberry PI right now 🙂

  • Xavier
    Posted at 11:19 am, May 2, 2013


    You can find a hard float version of oracle jdk8 here :



  • Bryan Hunt
    Posted at 2:59 pm, May 2, 2013

    I’ve also been playing with OSGi on the Raspberry Pi. You can also use the latest Java 8 build and it supports hard-float. I personally don’t use the launcher. You can launch the framework by simply: java -jar org.eclipse.osgi_3.9.0.v20130410-1557.jar. You have to do a bit more work to get the console running, but you can then minimize the number of bundles you are loading.

  • Kai Kreuzer
    Posted at 4:18 pm, May 2, 2013

    Hi Ian, you might find interesting that we are running openHAB already since end of last year successfully on a Raspberry Pi – see openHAB is a M2M / home automation application based on EclipseRT.

  • James Stansell
    Posted at 10:33 pm, May 3, 2013

    Doesn’t raspbian have the OpenJDK (icedtea) packages available in the repository?

Post a Comment