Topics and trends related to the Java ecosystem with occasional random rants.

Raspberry Pi and Java SE: A Platform for the Masses

James Connors
Principal Solutions Consultant

One of the more exciting developments in the embedded systems world has been the announcement and availability of the Raspberry Pi, a very capable computer that is no bigger than a credit card.  At $35 US, initial demand for the device was so significant, that very long back orders quickly ensued. After months of patiently waiting, mine finally arrived. 

Those initial growing pains appear to have been fixed, so availability now should be much more reasonable. At a very high level, here are some of the important specs:

  • Broadcom BCM2835 System on a chip (SoC)
  • ARM1176JZFS, with
    floating point, running at 700MHz
  • Videocore 4 GPU capable of BluRay quality playback
  • 256Mb RAM
  • 2 USB ports and Ethernet
  • Boots from SD card
  • Linux distributions (e.g. Debian) available

So what's taking place taking place with respect to the Java platform and Raspberry Pi?

  • A Java SE Embedded binary suitable for the Raspberry Pi is available for download (Arm v6/7) here.  Note, this is based on the armel architecture, a variety of Arm designed to support floating point through a compatibility library that operates on more platforms, but can hamper performance.  In order to use this Java SE binary, select the available Debian distribution for your Raspberry Pi.
  • The more recent Raspbian distribution is based on the armhf (hard float) architecture, which provides for more efficient hardware-based floating point operations.  However armhf is not binary compatible with armel.  As of the writing of this blog, Java SE Embedded binaries are not yet publicly available for the armhf-based Raspbian distro, but as mentioned in Henrik Stahl's blog, an armhf release is in the works.
  • As demonstrated at the just-completed JavaOne 2012 San Francisco event, the graphics processing unit inside the Raspberry Pi is very capable indeed, and makes for an excellent candidate for JavaFX.  As such, plans also call for a Pi-optimized version of JavaFX in a future release too.
A thriving community around the Raspberry Pi has developed at light speed, and as evidenced by the packed attendance at Pi-specific sessions at Java One 2012, the interest in Java for this platform is following suit. So stay tuned for more developments...

Join the discussion

Comments ( 8 )
  • Tobi Thursday, October 11, 2012

    Who needs this really??? What we need is JavaFX2 for iOS, Android and Windows!

  • guest Thursday, October 11, 2012

    As evidenced by the attention given at the just-completed Java One 2012 event in San Francisco, Java for embedded devices is something Oracle deeply cares about, and the mobile platforms you refer to (iOS, Android and Windows) represent one (albeit very, very important) market. With this software, Oracle is aiming at the burgeoning M2M space, where the aforementioned platforms aren't major players (yet?).

    But your point is well taken. The current decision not to make JavaFX available on mobile platforms was made at levels way above my pay grade, where factors unknown to us have to be considered.

    If you feel strongly about this, I suggest you and others who share your beliefs, make your opinion known in as public a manner as possible as frequently as possible.

  • Andy C Friday, October 12, 2012

    But how long are we going to wait for the armhf release ? Raspbian is, by all accounts, a much faster distro than debian, I'm really keen to see how much faster a armhf build will be on the Raspbian.

  • guest Friday, October 12, 2012

    From a Java perspective, my (not so) educated guess is that performance might improve slightly for a majority of cases. Perhaps we'll see some performance gain from the fact that (1) the JVM will be compiled with a newer and better optimizing compiler and (2) more platform specific (less generic) compiler options might be utilized to build the JVM.

    One would expect floating point intensive Java applications to improve markedly. Additionally function/method calling conventions have improved under armhf. So if you have an application that does a large amount of method calling proportionally, performance might improve nicely there too.

    As soon as an armhf JVM become publicly available, I intend on comparing armel and armhf versions and publishing to this blog. My guess is the results that will again draw the most attention will be the comparison between Java SE-E and OpenJDK

  • Andy C Friday, October 12, 2012

    Agreed with the comparison between Java SE-E and OpenJDK. I did my own tests here


    and was shocked by the Open JDK performance.

  • Jonathan S. Fisher Saturday, November 24, 2012

    Oracle's embedded Java license is a major hinderance. It states that a device used as a general computation machine doesn't require a license.

    RaspberryPi can be used as a general computation device, but it's physical size leads it to embedded applications, which requires a license from Oracle. Oracle's license is designed so you have to negotiate with Oracle, and likely, they're going to want a per device fee. Honestly, this whole thing scares me (dealing with lawyers and salesmen) so I'd probably choose to just develop in Ruby or Python, which is already widely accepted on the device.

    If Oracle wants a foothold with Java on this device, they need to rethink their 1990's microsoft-esk strategy.

  • guest Monday, November 26, 2012

    The open source OpenJDK version is available for these platforms too, which you are free to use. Even with this option, many organizations will still opt for the commercial version of Java SE-Embedded. Why? Among many reasons, it is simply better and is formally supported.

  • Jonathan S. Fisher Monday, November 26, 2012

    Thank you for the response Jim. I would agree that would/could/should be a viable option, but your own benchmarks show that Oracle's proprietary JDK is far superior to vanilla OpenJDK builds. If everything else was equal, and I had the _option_ to buy support from Oracle, I would have a different view point and would probably be advocating rather than admonishing the use of Java on the device.

    So I stand by my original point: I don't think Java will be relavent on this device without a free, less restrictive, and performant implementation when the F/OSS alternatives are 'just as fast' as the vanilla OpenJDK builds.

    Even a simple policy change like: "Are you building less that 5,000 devices a year? Claim your free Java license online right now!" would start to open doors for Oracle.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.