JavaOne: JavaFX 2, Java on iOS
I've been at JavaOne all week and the experience has been fantastic. Oracle has put a lot of resources into ensuring that Java continues to be the number one developer platform, and the effort is bearing fruit.
Overall, Oracle doubled the space for JavaOne (it's within and between the Nikko and Hilton hotels on Mason Street), and attendance is twice what it was last year. Here is an overview of what Oracle has announced so far at JavaOne 2011 (details to follow in later blog posts):
- JavaFX 2.0 with new all-Java APIs for Windows, and an early access release for Mac OS X
- Java SE 7 preview for Mac OS X
- Java EE 7 with integration into the cloud, and PaaS
- JDK 8 plans: Project Lambda (closures), Project Jigsaw (modularization of JDKs and JVM)
JDK 8 will also add support for defender methods, which are default methods for when you extend an existing interface. In a nutshell, they help to maintain binary compatibility, and allow interfaces to evolve over time without breaking compatibility.
Project Jigsaw will work like Maven, and help you pull in just the parts of Java, bundled in specific packages, that you need. A new tool called jmod will be an improvement over the JAR utility, which will create other types of archives, such as RPM, deb, and other packages as needed.
Oracle is also striving for JVM Convergence between Sun's Hotspot and Oracle's JRockit with JDK 8. This should amount to internal improvements such as enhanced garbage collection, which will continue to improve JVM performance.
It didn't stop there. Oracle went on to discuss the beginnings of JDK 9. It's good to see long-term plans for Java, such as:
- Self-tuning JVM: Attempt to eliminate the need for command-line parameters altogether, regardless of the application.
- Improved Native integration: Make it easier and less cryptic to write native code.
- Allow for "Big Data": Support for large heaps and data sets that are potentially hundreds of gigabytes in size, or larger.
- Reification: Resolve the disjoint type system of primitives, i.e., int versus Integer.
- Some others, without going into detail: meta-object protocol, multi-tenancy, resource management, and heterogeneous compute models.
Inside JavaFX 2.0
Oracle has stated that JavaFX 2.0 is Java's client technology going forward. This means that instead of Swing, JavaFX should be the API of choice for Java GUI application developers. It's also where the bulk of Oracle's effort will be focused for future GUI innovation. As for existing Swing applications, Swing will not be going away, and Oracle has worked hard to ensure that the JavaFX and Swing APIs will work together. This means that you can extend existing Swing applications with JavaFX 2.0; Oracle has provided full integration between the two. This is a direct result of Oracle listening to Java developers' concerns and requirements in this area.
Richard Bair and Jasper Potts went on to demo JavaFX 2.0 with a series of sample applications, the most interesting of which was a demo that included a Microsoft Kinect camera. Using JavaFX 2.0's advanced 3D and animation, along with the fact that it's all Java, they used a Kinect to move a 3D version of Duke on the screen as Potts moved around on stage. It was a powerful demo, and a real crowd pleaser.
Oracle also announced the new JavaFX Scene Builder, which is a rapid development platform for GUIs, along with a beta version of NetBeans 7.1 that fully supports JavaFX 2.0. All are available for download to try today.
Along with the JavaFX APIs, you can use FXML for UI markup, which is a way of defining the UI using XML. I suppose this may be similar to XAML in .NET.
JavaFX 2.0 and HTML5
Right now, JavaFX 2.0 is a separate download, but beginning in December, it will be integrated into Java SE 7, and will be included when you download the JDK.
Java SE and Java ME
As for Java SE, Oracle announced and released a preview version of Java SE 7 for Mac OS X. While it's in early access form now, Oracle plans to release it in final form by early 2012.
Regarding mobile Java's future, Oracle plans to align Java ME CLDC (for smaller, more constrained devices) with the latest Java SE language features, and synchronize releases from that point onward. This includes tooling, which will work across ME and SE. Oracle also plans to combine Java ME CDC with Java SE Embedded using the modularity features of JDK 8's Project Jigsaw. No solid time frames were given for this integration.
Oracle also announced full support and optimization of Java on ARM chipsets, with performance acceleration, and an enhanced C2 just-in-time (JIT) compiler, optimized for the ARM instruction set.
Java and JavaFX on iOS and Android
The most interesting announcement came when Oracle demoed both Java and JavaFX applications running on a Windows tablet, an iPad, and a "Linux-based tablet". To achieve iOS compliance, Oracle is working on an enhanced compiler that takes your Java application, unchanged, compiles it with the JVM built within it, and bundles it as a fully-compliant iOS application that meets Apple's requirements. Currently, this JVM is a variant of Java ME's CDC JVM, and depends on some enhancements that are not yet final, but this offers promise that Java applications will run on mobile devices and tablets in the near future.