The Planetarium

           Java for all clients: Java SE, Java ME, JavaFX and JavaCard

Sampling JavaFX 1.2

Filed under: javafx on Thursday Jul 02, 2009

One of the best ways to chart the progress of JavaFX these days is simply to go and look at the samples.

The new set of UI controls and layout managers in JavaFX 1.2 are pretty nifty. So its easy now with these new additions to the scenegraph to go from gamesy style (like Brick Breaker, or Pac-Man) to plain fun, like the flickr photo viewer, through drawing centric apps all the way to the more traditional interface, like this project manager, or any hybrid inbetween. With its own skin in CSS.

Getting data into a JavaFX application is easier too: you can easily fetch the data in a background task, as seen in this simple Twitter client, or get it from an RSS or ATOM feed, and no matter where you are (Desktop (Windows, Mac, OpenSolaris or Linux), mobile or TV) you have application data stick around locally between sessions.

And with the new RTSP support for media, smaller application binaries and runtime optimisations, you should notice a jump in speed also.

Garbage First 'quite zippy'

Filed under: java javase jdk7 on Wednesday Jul 01, 2009

You've probably been told over the years how great JVMs are. How well they've scaled, perform under a variety of different loads. How its doing its part to take advantage of the processing power of multi-core systems now that cranking the clock rate is almost wrung dry.

The automatic memory management provided by the JVM's garbage collector is one of the most important aspects of scaling the JVM. There are many different kinds - as this great primer shows.

The new (free) Hotspot Garbage First collector in beta form for evaluation in Java SE 6u14, and which will ship production quality in JDK 7 is summarized succinctly here, and you can find a more detail here about this generational, compacting, mostly parallel collector that offers a much smoother ride that the CMS collector will replace.

And some early signs of use are encouraging !

JavaFX: gr8 2 c on fonz

Filed under: javafx javame on Tuesday Jun 30, 2009

What with the release of JavaFX 1.2 and JavaFX phones on sale to developers, and on view, for example here and here, the fact that the JavaFX language and common APIs are the same whether you are on the desktop or on a mobile device (or a TV set top box) is worth chatting about.

Of course, there are design considerations when creating applications for the smaller screen. And you need to take some care over input methods (keys, mouse, touchscreen). And of course there are times when you want to write an application that uses a feature that is totally specific to the underlying client device.

Like SMS on a mobile phone. So reading this article should give you a really clear picture of how to take advantage of the underlying messaging capabilities on a Java ME phone, and combine it with the fit and finish of a JavaFX UI layer to make a professional SMS client, with all the visual cues and polish that are both desirable and required now in a phone application. And along the way, put together an on screen keyboard with the minimum of fuss.

Java ME Defragmentation

Filed under: java javame on Monday Jun 29, 2009

For those of you concerned about Java ME fragmentation, you were probably pleased about the creation of JATAF - a group of mobile companies (and Sun) getting together to try to sort out the issues of differences in implementation, quality, and performance that even the best API specs can't always iron out.

Such organizations often flirt with an excess of hot air, but happily, this organization is taking a practical approach - by basing their efforts around collecting up a big set of tests that plug into a test framework that originated in a Sun testing product called JDTS for mobile devices that can run its 12,000 or so tests on Java ME mobile devices and that's been around for quite some time. Such tests assume API compatibility, which is what the JCP requires, taking testing to a deeper level by probing the other implementation qualities such as reliability and performance.

One step that made this possible was the open sourcing of the test framework, the Java Device Testing Framework from the Sun product. So now folks can sign up to JATAF and submit tests into the framework for all to use. There's over 70 already. You can read more at Terrence's blog, or listen in to the latest Java Mobility Podcast.

JDK 7: Collecting Honey

Filed under: java javase jdk7 on Wednesday Jun 17, 2009

There's also been a flurry of blogging and articles around the JDK 7 Preview, released at JavaOne, too.

Like about Project Jigsaw, which will modularize the JDK. Most of the audience got it when Mark announced that Classpath is Dead, but for a deeper dive, check out this JavaPosse episode, where both Mark and Alex got a grilling.

Or about the multi-language VM work, which John presented. And Charlie has used already in an experimental version of JRuby. And bytecode manipulation framework ASM has already picked up. Who's next ?

Project Coin, which is gathering a small set of additions to the Java language for JDK 7 is narrowing down the many options, as you can see from Joe's slides.

Take a look at this detailed article about NIO2, also in the JDK 7 Preview, and which Alan presented on.

And thankfully the is-the-G1-collector-free-or-not storm in a teacup blew itself out.

JavaFX: Busy Bees

Filed under: javafx on Tuesday Jun 16, 2009

You may have noticed that before JavaOne there wasn't the normal amount of blogging in the Java/JavaFX world. But during and since, its definitely made up for lost ground. Wow.

Like about JavaFX (eyes on the prizes ?). Obviously, there's been a bunch of blogging about the new features in JavaFX 1.2, that was released at the show. Top 5 feature lists, top 10 feature lists, the new layout support, experiences deploying from NetBeans to the new JavaFX 1.2 phones, taking the new charting component out for a spin, and evaluating the new performance improvements. And the series on Pacman in JavaFX is now complete.

Of course the samples gallery got an upgrade too: simply the quickest way to see what JavaFX can do nowadays.

Founding Swing team member Amy Fowler did another awesome blog on how to use JavaFX to give your Swing app a zappier look, and Swing/FX team stars Richard Bair and Jasper Potts have started a new multi-player blog where they've already taking a fascinating deep dive on how to skin JavaFX app. And as Tor so ably demonstrated, the upcoming (end of the year) designer tool is stirring up some interest.

Interest in JavaFX is definitely up since JavaOne !

Is it hump day already ? Day two: all about smaller devices !

More App Stores

The day started out with a keynote by Sony-Ericsson, who, guess what, are opening an app store for Java ME apps ! Together with the previous day's announcement from Verizon opening up their application developer model to Java ME, and of course Sun's new Java Store, the Planetarium's prediction that this is the year of the app store, really is coming true !

JavaFX Mobile 1.2

JavaFX Mobile developers are getting that performance boost as part of the JavaFX 1.2 release (20% in runtime perf, about 1/3 reduction in compiler output). And of course all the other goodies like the cross device UI controls.

Eric showed great new JavaFX apps at the Sun Mobility keynote: ReallyMe for social proximity, and PayPal (pictured) for mobile payments.

JavaFX Mobile Phones

Sony-Ericsson wrote a Twitter client (perhaps not as good as this one) live in their keynote and deployed it to three of their JavaFX phones, including those running WindowsMobile and SymbianOS). Best of all, JavaFX Mobile 1.2 phones are on sale at JavaOne, some even got hurled at the Mobility Keynote.

Java ME

The testing framework Java Verified goes into open source, and plays a central role in the new anti-fragmentation initiative JATAF (behind which Orange and Vodafone threw their support today), Java ME 3.0 SDK running on a MAC is on show at Java Utopia, and the recent PhoneMe milestone 4 release.

And in preview for the end of the year....

JavaFX (running on embedded Java SE on Linux) seen running on a new Qualcomm smartbook, the JavaFX TV platform running on the LG TV.

Kicking the tires, free, on Garbage First

Filed under: jdk jdk7 on Tuesday Jun 02, 2009

Just a note to clarify the terms of using the Garbage First collector in Java SE 6u14. Right now, because its still new-ish and not thoroughly battle tested, its turned off by default and intended for use to evaluate it. As you know, many people already have been doing so. Here's the command line option to turn it on:

   -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

Once the team has ironed out all the kinks (and please, let them know if you find any !), it will be ready for primetime, and will be in JDK7, where it will be available for free, no strings, under the usual terms as part of the JDK.

The Janitor is told that an earlier version of the release notes implied that you had to have a support contract to use G1. Some certainly ran with that ball and even made a topical story out of it !

Our bad. So we made the notes clearer, because you don't need to do anything special to try it out. Unless you want your kinks fixed before everyone else gets the fixes either in the next update or in JDK 7. In which case, there is nice little program waiting just for you :)

Halfway through the first day of JavaOne 2009, so much has already happened !

There'll be more about JavaFX and Java ME tomorrow, but here's the announcements about Java SE and JavaFX so far.

The Java Store
What's the thing that will allow Java and JavaFX developers to get their apps out to a massive audience ? You knew it was coming ! The Java Store doing a restricted preview of its late summer grand opening, which means you need to sign up to try it out. The front end is a JavaFX application, the backend, which also includes the Java Warehouse, where developers will submit applications that show up in the store, is a Java EE application running on Glassfish. The first iteration is for desktop applications, with mobile apps coming later.

JavaFX 1.2
Surprise ! There's a new mobile emulator, there's a long list of new cross device GUI components, layouts, support for RSS and ATOM feeds, the startup on the desktop is about 40% quicker. Try out the new samples. And there's preview versions of JavaFX on Solaris, Linux.

JavaFX.next
JavaFX on TV, as seen on an LG TV set-top box ! A new JavaFX Authoring tool ! Totally new super fast graphics stack for JavaFX. All three by the end of this year.

Java SE
Java SE 6u14 is out with the new 64bit browser plugin, and an evaluation version of the new G1 collector. The preview of JDK 7 is released (based on Milestone 3), and a first sighting of Project Jigsaw, showing the JDK partitioned into a set of small modules: jdk-base, jdk-awt, jdk-swing, jdk-tool etc that can be loaded (quickly!) with minimal dependencies.

Deja vu moment
Rewriting StarOffice in JavaFX ?

From the JavaOne Keynote

Filed under: javaone on Tuesday Jun 02, 2009

Some big names on stage already: eBay, Rim, Sony, Verizon, Intel. Stay tuned for a wrapup later on.

See you next week

Filed under: javaone on Friday May 29, 2009

See you next week !

Or, stick The Planetarium in your favorite feed reader to get all the show news.

Or, follow The Planetarium on Twitter from the show.

Guessing the JavaOne news

Filed under: javaone on Wednesday May 27, 2009

If you believe everything that you read, then you have some surprises in store at next week's JavaOne conference.

A) Its going to be the last one.
B) Sun's going to launch an app store
C) Microsoft is giving a keynote
D) You'll see a BluRay player streaming content.
E) There'll be this crazy Java Utopia thing in the pavillion hall
F) Sony-Ericsson will announce something big about mobility and Java
G) You'll get a sighting of Project Jigsaw in action

But, you've probably been before: JavaOne, all its organization and chaos, never works out how people think it will.

That's the fun of it :)
Filed under: java javafx jdk7 on Tuesday May 26, 2009

The Janitor isn't one to fall prey to the latest trends, but there's one trend that this week will follow: there won't be much news this week about Java SE, Java ME, JavaFX or JavaCard before the start of JavaOne next week.

But if you go by what people are searching for, its easy to see the cyclical nature of the interest in the JavaOne show, where many of the companies involved in Java save up their technology announcements. And you can clearly see the growing interest in JavaFX since May 2007 when it was announced, in JDK 7 since the release of Java SE 6 in December 2006, continued interest in Java TV (stay tuned), and in Java updates. Even Project Vector is showing an interesting recent spike.

And in a trend few would have predicted for JavaOne in 2001, Microsoft will be giving a keynote (about interoperability with .NET).

GR8 time in Copenhagen

Filed under: java jdk on Friday May 22, 2009

This helpful article about how the Groovy language plugs into Java SE 6, together with a nice code example of how to execute arbitrary Groovy code, came at the end of the first GR8 conference in wonderful, wonderful Copenhagen.

The talk about the Griffon hatchling looked interesting. To get an idea of where this framework that combines Groovy with Swing,  is at here's a Twitter client in Griffon. Guillaume's DSL talk was reviewed in detail, and there was lots of twittering.

Maybe there will be another next year ?

JavaFX Styling

Filed under: javafx on Thursday May 21, 2009

What with all noise about Project Vector starting to swirl around, its easy to miss some of the JavaFX news that's been going on. Don't expect to hear much from the JavaFX engineers, they're all heads down on JavaFX 1.2 and JavaOne talks.

And there's more in store ;)

But javafx.com continues to fill up the racks with fresh items on developing in JavaFX. There's new help if your app needs bust-a-moves backward, and help if your app needs a styling refresh. Try some of these off the peg accessories.

And for a more retro look, relive 80s chic in this two part series on writing PacMan in JavaFX, part 1 and part 2.

Some are even using JavaFX to give others some style tips ! Who'd have thought it ?