Monday Mar 30, 2009

Planet Cast Two: James Gosling on Java and JavaFX

Tune in to the second in the Planet Cast podcast series with a conversation (~35 mins) with James Gosling all about what get's him excited, starting with an impromptu poety reading, but mostly all about what's going on in with Java and JavaFX.

From Garbage First, through modularity in Java, multiple languages, Swing and JavaFX, this is a must listen episode from the man who started it all.

Listen or download here. (Friendlier means coming soon).

Tuesday Mar 24, 2009

Finding Files in Java

No sooner than the latest iteration of the upcoming FileSystem API makes it into the latest JDK7 build than someone is trying it out. Today, Sharon illustrates the use of the API to walk a file tree to look for files (including following any symbolic links) that match a given search criterion.

And if the file you need isn't on your laptop, maybe its on your Java ME phone. Just last week, Vikram did a detailed walk-through of how to use the Java ME Bluetooth APIs (standard API in the current MSA Java ME platform), to hookup to your laptop and push over the file to where you need it.

Monday Mar 23, 2009

Planet Cast One: JSR 292, DaVinci Machines and Multiple-languages

Tune in to the first Planet Cast with John Rose from Sun's Hotspot JVM group for an in depth conversation (about 40 mins) with the Janitor all about dynamic languages on the JVM, JSR 292, and the work to make them easier to bring onto the JVM and run faster there than anywhere else. And what's John's favorite language other than Java ?

Tune in here.

Monday Mar 16, 2009

A Twitter Client is the new Hello World

The growing chorus (amongst a cacophony) of very usable Twitter clients that use Twitter's REST API and run on the JVM, show to great effect that the Java runtime is a lovely place for a RIA app to perch.

Like Greet (start) which is build on the Griffon framework. Griffon uses the Groovy language and Swing components, and just hatched its 0.1 release.

Or the Simple Twitter Client, (start), built with the Scala language and Swing components wrapped in the Scala Swing package, as you can see here.

Or any of the JavaFX Twitter clients, Tweetbox (start) or TwitterFX, (start) built with the scene graph and JavaFX Script.

No news to those of you at last year's JavaOne ScriptBowl, but nice illustrations of why, what some may consider dull plumbing: tweaking the bytecode, modularizing the JDK, and rewriting the browser plugin benefits all RIA apps that run there, whatever their language: they run faster, start quicker, and integrate better into web pages (or pull out too).

Thursday Mar 12, 2009

The Planet Cast: what do you want to hear ?

<script language="JavaScript" src=""></script> The Planetarium recently had a new delivery, so its time to announce the Planet Cast.

The Planet Cast is a new podcast series devoted slavishly to technical conversations with the expert engineers who help bring you Java SE, JavaFX, Java ME and JavaCard. (No marketing !)

What Planet Cast would you like to hear ?

Wednesday Mar 11, 2009

Java SE Traffic Management

Think of concurrent programming as nothing more than traffic management.

You may have been lucky in your programming work so far only to have to think about a single lane of traffic, relying on the road authorities periodically to raise the speed limit to allow your vehicles to go faster. But as hardware makers lay wider freeways with multiple lanes, and as your traffic gets heavier, you may need to start worrying about how to use the capacity better to get everyone where they need to be on time.

Perhaps building a thread gate, the equivalent of a traffic signal. As this article shows, and as applied to a prime number generator, a thread gate let you manage the execution of tasks where there are dependency on the completion of some of the tasks on others in your program. Just as traffic at a four-way intersection is regulated by a rule, albeit at intersections, a simple one: each two way direction takes it in turns to avoid collisions.

Or using a BlockingQueue, already part of Java SE. A BlockingQueue is something akin to the kind of smart traffic signals that tracks waiting vehicles to decide when to allow them to pass. This blog illustrates its use in bridging the gap between two intensive tasks: parsing large amounts of data from heterogenous sources, and persisting it.

Or, looking ahead to JDK7, a variant on the BlockingQueue called the TransferQueue, described in detail here. Although not a perfect anaogy, its smarter kind of traffic signal you have have seen metering traffic entering freeways, which takes into account both waiting vehicles and the flow of traffic on the freeway.

So if you're tiring of life in the single lane, maybe its time to experiment with the Concurrency Utilities in Java SE, and look further down the freeway to those coming in the future.

Update: Do check out Brian's talk about parallelism in Java from Devoxx here (How could the Janitor forget, he was in the audience). Thanks Patrick for the tip.

A blog all about Java in all its flavors on all client platforms from smartcards to desktops and everything inbetween.


« July 2016