Oracle's ambitious plan for client-side Java

At JavaOne, Oracle announced a big initiative to revitalize Java on the desktop, the Web, and mobile devices. Can it follow through?

Java has long been a hit with enterprise developers, with Java EE powering the back ends of enterprise applications in data centers around the world, while Java application servers and servlet containers enable countless Web applications.

For client-side development, however, Java hasn't fared nearly as well. There have always been Java technologies aimed squarely at the client: Java applets debuted with the first release of the platform, and Java ME was an early hit with cellphone vendors. Various toolkits and frameworks have been released over the years for building rich, GUI-based Java applications for the desktop.

[ Paul Krill explains Oracle's new plans for JavaFX. | Get software development news and insights from InfoWorld's Developer World newsletter. | And sharpen your Java skills with the JavaWorld Enterprise Java newsletter. ]

But as the years rolled on, modern client-side development methods have increasingly left Java behind. Adobe's Flash quickly supplanted Java applets as the preferred means of delivering rich content to the browser, and continuing improvements to HTML and JavaScript mean we may soon be browsing a plug-in-free Web. (Apple's iOS is already there, as will be Microsoft's forthcoming Windows 8 on mobile devices.) Modern smartphones don't use Java ME; Research in Motion is trading its Java-based BlackBerry platform for one based on the QNX real-time OS, and even the Java-based Android platform uses a nonstandard implementation of Java. And Java on the desktop never really took off; other than Azureus and Eclipse, I can think of few examples of consumer-facing desktop Java applications.

So it's been tempting to assume that Oracle, with its strong enterprise focus, would ignore the client in favor of data center technologies such as Java EE. This week, we learned that's not the case. In fact, the real news from this year's JavaOne conference in San Francisco may not be Oracle's plans for Java 8 and 9, but the revelation that Oracle is gearing up for a new, sustained push behind Java for the desktop, the Web, and mobile devices. If it can succeed in its ambitious plans, the age of client-side Java could be just beginning.

JavaFX everywhere

The cornerstone of Oracle's client-side efforts is JavaFX, a Java technology aimed at making it easier for designers and developers to collaborate to build rich, graphical UIs. JavaFX has been around since 2008 and is widely regarded as Oracle's attempt to replicate Flash or Silverlight for the Java crowd. According to Oracle reps, JavaFX is now the preferred method of building all kinds of GUI applications and games, and developers should use it in favor of older technologies such as Swing (although Swing will continue to be supported and its APIs will be closely integrated with JavaFX).

The new version announced at JavaOne, JavaFX 2.0, introduces several new features, such as an XML-based UI description language and support for new devices, including Microsoft Kinect. It also does away with JavaFX Script, a simplified language used for scripting UIs in earlier versions. But its most important improvement is that unlike previous versions, the JavaFX 2.0 APIs are all 100 percent pure Java. That means JavaFX is now supported on any device that offers a JVM. In addition, developers can code JavaFX applications in any languages supported by the JVM, including alternatives such as Clojure, Groovy, and Scala.

Oracle has been paying attention to current trends as well, in particular the rise of HTML5 and JavaScript as application UI development tools. JavaFX 2.0 allows you to embed HTML5 content in JavaFX applications and have it rendered via WebKit, much as you can do with Adobe AIR. Another Oracle effort, Project Avatar, aims to enable hybrid applications where HTML-based UIs share content between Java clients and Java EE servers, both in data centers and in the cloud. These initiatives should help make client-side Java more accessible to developers with a strong Web background.

Expanding Java's reach

But increasing Java's appeal to client-side developers is pointless if Oracle ignores the elephant in the room, which is that Java simply isn't available on enough clients. Early on, Java was billed as the "write once, run anywhere" language, but these days that simply isn't the case.

Thankfully, Oracle seems to have gotten the message, and it's working hard to expand Oracle's reach into more platforms. First up is Mac OS X. Java support on Mac OS X has typically lagged behind the current release, and Apple deprecated its own Java implementation in 2010. At JavaOne, Oracle demonstrated good progress toward rectifying this situation with the announcement of a preview release of JDK 7 for Mac OS X, offering hope that Java desktop applications may soon by truly cross-platform once again.

Oracle's main focus, however, seems to be getting Java running on more mobile devices (and rightly so). At JavaOne, it announced plans to unify the aging Java ME technology with the latest version of Java SE. The platforms will still cater to different audiences -- Java ME for small embedded devices and Java SE for more powerful devices and PCs -- but the converged platform will hopefully mean Java ME development is no longer an arcane specialty and technologies such as JavaFX will be available on more devices.

To that end, Oracle offered the biggest eye-opener at JavaOne: a JavaFX-based game running on both an iPad and an Android tablet (which Oracle reps pathetically kept referring to as "a Linux-based device"). Sun had long battled to get Java running on iOS, without success, and the JavaOne demo wasn't quite that Holy Grail, either. Because of Apple's license restrictions, a stand-alone JVM isn't allowed on iOS. Instead, Oracle engineers had linked a private JVM as a resource inside a launcher app -- a clever hack, if an awkward one.

Oracle vice president Nandini Ramani was quick to point out that the iPad demo was more a proof of concept than anything else. "We want to hear from the community. If this is something you want to see, we're happy to make it a priority," he said.

Is it time to give Java a second look?

Do you want to see it? Or has that boat already sailed? Given all the other options available -- from .Net to native iOS and Android development to Flash/AIR to pure HTML5 and JavaScript -- why would anyone choose Java and JavaFX now, when Java has yet to prove itself as a broad client-side development platform?

One answer is that Java is a mature, rich, and powerful tool set. If Oracle can follow through on its plans to make modern Java available on a wider range of platforms, it could be one of the most effective cross-platform development tools available.

Another answer is that Java can be considered one of the most open platforms around. It's not wedded to any OS, hardware, or app store. The JDK is 100 percent open source, and at JavaOne, Oracle announced its intention to open-source still more Java technologies over the coming years, including JavaFX.

Of course, the biggest item in the negatives column is that Java is still run by Oracle. It's easy to get excited by big talk at a conference like JavaOne, but results are what matters, and Oracle has disappointed many times since acquiring Sun. I remain cautiously optimistic, but experience suggests the smart path is to remain skeptical.

This article, "Oracle's ambitious plan for client-side Java," originally appeared at Read more of Neil McAllister's Fatal Exception blog and follow the latest news in programming at For the latest business technology news, follow on Twitter.

Copyright © 2011 IDG Communications, Inc.