Site Archive (Complete)
Java Blog: JavaFX Compiler and NetBeans Plugin
Java
SWAINE'S CAFE

Black. No Sugar. Extra Caffeine.

by Mike Swaine
ERIC BRUNO'S BLOG

Java: The Daily Grind.

by Eric Bruno
August 02, 2007

JavaFX Compiler and NetBeans Plugin

JavaFX continues grow as an excellent graphical, web-enabled, and Java-compatible programming language.

I recently spoke with Chet Haase from Sun regarding JavaFX script, its compiler (https://openjfx-compiler.dev.java.net), and the recently released NetBeans plug-in. Chet is an architect in the Java Client Group at Sun Microsystems, and is the author of the new book, Filthy Rich Clients (part of the Sun Java Series). And as his blog title says, “he spends most of his time working on graphics and performance issues and futures.” That’s a very cool job to have in my opinion.

In short, JavaFX script has the ability to enable a different type of GUI developer; one that doesn’t have the level of sophistication, or simply the time, to master GUI programming with Java Swing or Java 2D. Instead, JavaFX provides this level of sophistication to those who either don’t want to learn the depths of Java and Swing, or those who simply want to create application mock-ups, prototypes, or quick GUI front-ends to other applications.

Sure, there are many cases where JavaFX script might supplant the use of pure Java and Swing, but the more likely scenario involves applications that include a mix of Java/Swing and JavaFX script. Like every other technology, it’s important to use the best tool for the job, and not get religious about using script vs. Java.

To help JavaFX script grow into a more serious language of its own, Sun recently announced and made available the OpenJFX Compiler. The compiler translates JavaFX script to JVM class files (also known as bytecode). The end result is something that can be executed by the JVM, and will be optimized by the HotSpot JIT just like any other Java class file. This implies Java FX script has the potential for excellent platform-level performance.

In fact, the JavaFX compiler uses and extends the javac compiler. Therefore, JavaFX is plugged into the roadmap for Java SE going forward, and will inherit all of the changes and enhancements made along the way. Best of all; it’s completely open to contribution. You can look at the source; contribute to it; read and contribute to the Wiki; and join all of the forum discussions.

JavaFX NetBeans Plugin

The NetBeans Plugin puts a visual interface on top of the command-line JavaFX tools. It’s completely integrated with NetBeans, providing feedback in terms of syntax and errors through the editor. All of the demo applications—an excellent resource to use to learn JavaFX—are available as NetBeans projects. Additionally, the JavaFX Pad demonstration application is made part of NetBeans thanks to the plugin.

Java FX Pad (read more in this online Sun article) allows you to copy and paste your own JavaFX application source code within it to provide an environment to test your code.

JavaFX is moving quickly, and it provides a lot of GUI-programming power with little overhead. Now, with the release of both the compiler and the NetBeans plugin for development, JavaFX Script has become a serious programming environment.

Happy code,
EJB

Posted by Eric Bruno at 02:40 PM  Permalink




 
INFO-LINK


Related Sites: DotNetJunkies, SD Expo, SqlJunkies