FX Experience Has Gone Read-Only

I've been maintaining FX Experience for a really long time now, and I love hearing from people who enjoy my weekly links roundup. One thing I've noticed recently is that maintaining two sites (FX Experience and JonathanGiles.net) takes more time than ideal, and splits the audience up. Therefore, FX Experience will become read-only for new blog posts, but weekly posts will continue to be published on JonathanGiles.net. If you follow @FXExperience on Twitter, I suggest you also follow @JonathanGiles. This is not the end - just a consolidation of my online presence to make my life a little easier!

tl;dr: Follow me on Twitter and check for the latest news on JonathanGiles.net.

JavaFX links of the week, December 31

Welcome to the last JavaFX links of the week for this year! Obviously with the festive season in full swing this week is a relatively quiet week, but nonetheless I have some interesting links for you to read. Enjoy, and have a good new years and start to 2013! Catch you in a weeks time! 🙂

  • Stephen Chin has announced his plans to go on another night hacking tour, this time taking in the Nordic countries between January 25 and February 7.
  • I was given a (virtual) clip around the head by Ed Thompson for his issues when dealing with the JavaFX ComboBox control. Fortunately most issues are on their way towards being resolved, and as always I’d love to work with people feeling pain in any UI control to develop improvements and / or review patches based on the OpenJFX source code.
  • Hendrik Ebbers has started playing with JavaFX on Raspberry Pi. He has been investigating using DataFX and GridFX on it, and has posted some videos to show progress.
  • Andy Till has open sourced a JavaFX application that he has been developing called EstiMate.
  • Narayan Maharjan has posted part two of his 3D Object (cube) ‘concept to code’ series of posts.
  • Thierry Wasyl continues to develop his DrawFX application, and has posted an update with his latest progress.

That’s all for this year – catch you all again next year when we do it all over again! 🙂

JavaFX link of the week, December 24

It’s Christmas eve here and there is a huge number of links, so please excuse the brevity – I want to get back to family and food! 🙂

JavaFX

JavaFX and Raspberry Pi

Wow, that took a long time to write! Catch you all again next week – and I wish you all a great festive season.

JavaFX on Raspberry PI

JavaFX on Raspberry PI

BrickBreaker running on a Raspberry PI

BrickBreaker running on a Raspberry PI

Today Oracle has released the first JavaSE 8 + JavaFX Developer Preview. This is really exciting for anybody who’s wanted to try out the $35 Raspberry PI ARM mini-computer (and I do mean mini!). Incidentally, anybody who picks one up really needs to get the Pi-Bow enclosure for the PI — I got one yesterday and highly recommend it!

JavaSE is a HotSpot based VM, so it is really quite zippy. I did some timing calculations on my PI this morning based on the prime number test provided in this Raspberry PI Java forum posting. Yes, there is a new Java category on the Raspberry PI forums, do visit and leave your experiences there :-). Anyway, I ran both Java and GCC version 4.6.3 with -O2 performance optimization enabled.

Test Real User Sys
JavaSE 8 (build 1.8.0-ea-b36e) 0m7.830s 0m4.970s 0m2.840s
GCC 4.6.3 (Debian 4.6.3-12+rpi1) 0m7.716s 0m4.990s 0m2.700s
GCC 4.6.3 (Debian 4.6.3-12+rpi1) -O2 0m6.361s 0m3.940s 0m2.400s

I find the results really impressive, because basically the difference seen between Java and native is just due to the startup costs. Which means that Java is a really great choice for developing applications that will run on the Raspberry PI. Java also represents (to my knowledge) the first VM stack to optimize for hard float on ARM v6.

I couldn’t help myself though, I cranked up the test to find all prime numbers below 50,000 to see if the startup costs in fact are the difference between the JVM and native code. Below are the results. As you can see, HotSpot is faster than native code!

Test Real User Sys
JavaSE 8 (build 1.8.0-ea-b36e) 1m37.808s 1m25.570s 0m12.000s
GCC 4.6.3 (Debian 4.6.3-12+rpi1) 2m18.875s 2m7.390s 0m11.1300s
GCC 4.6.3 (Debian 4.6.3-12+rpi1) -O2 1m42.166s 1m31.206s 0m10.580s

I wrote a quick JavaFX application this morning and tried it out. A couple things to make sure you note!

  • jfxrt.jar is not on the classpath by default (yet). So be sure to include it!
  • -Djavafx.platform=eglfb must be specified. If not, it won’t run.
  • Ahem. There appears to be no way to kill an FX app, unless you can SSH into your box or switch to another terminal. Or have your app make sure it has an exit button. But then, when playing BrickBreaker, who’d ever want to stop?

None of the flags used in javaFX on the command line are “public API” and may go away in the future, but this particular flag is likely to be around for a while. It lets you choose which version of glass to run with. On Raspberry PI, right now, the only option is eglfb (which makes you wonder why we require you to specify it on the command line. There are some questions that we just shouldn’t ask ;-)). Basically EGLFB runs OpenGL on the frame buffer directly, meaning that it wants to own the entire screen. This is great for Kiosks and media centers and such, but not so good for normal X11 usage. Hopefully the X11 usage shows up sometime soon, but in the meantime, JavaFX will own the display.

You should go read the developer preview documentation and also Stephen Chin’s blog on PI. JFokus has a Raspberry PI hands on lab, which is already fully booked, but I’m betting you can get Simon Ritter to give you some material if you want to try at home :-).

Have fun hacking over the holidays!

JavaFX links of the week, December 17

2012 is rapidly running out, but fortunately the number of links (and the quality) continues to rise. 2013 looks like it might be a very good year for desktop Java at this rate! Keep up the great work folks:-)

That’s us for another week – catch you all next on Christmas Eve (hopefully, assuming we don’t all get wiped out on December 21st 😉 )