Posted by terrencebarr
on December 6, 2008 at 6:06 PM PST
JavaFX 1.0 is here. JavaFX is the expressive platform for creating and delivering rich Internet experiences across all the screens of your life: for web browsers and desktops - and (in preview) for mobile phones.
- See Jeet Kaul's blog "JavaFX - The road ahead"
- Running JavaFX applications on real devices (see below)
- Check out this video with Jacob Lehrbaum, Sr. Product Line Manager for JavaFX Mobile
JavaFX 1.0 is here!
JavaFX is the expressive platform for creating and delivering rich Internet experiences across all the screens of your life: for web browsers and desktops - and (in preview) for mobile phones.
Today's JavaFX 1.0 release includes these components
- The JavaFX development environment including the FX Script compiler and runtime tools, graphics, media, web services, and rich text libraries
- NetBeans 6.5 with JavaFX
- The JavaFX Production Suite
- The JavaFX Desktop Runtime
- The JavaFX Mobile Runtime (in preview)
What's unique about JavaFX?
- JavaFX allows developers to create expressive rich Internet applications quickly and easily across multiple screens, including mobile phones, desktops, televisions, and other consumer devices
- JavaFX provides a unified development model for building rich client applications that integrate immersive media - audio, video, vector graphics, rich text and web services
- JavaFX features a suite of designer and developer tools that enable an efficient, productive and iterative designer-developer workflow
- JavaFX combines the best capabilities of the Java platform with comprehensive, immersive media, graphics and JavaFX Script â€“ a simple and intuitive scripting language
Because JavaFX leverages the power and pervasiveness of the Java platform JavaFX will run most everywhere Java is running today - including mobile devices.
On the Desktop. In the Browser. And on your Mobile Phone. Same code everywhere.
Ok, show me! ... glad you asked ;-)
Let's try out a simple but useful example of a JavaFX application with a nice little GUI that accesses a web service (Yahoo! Local Business search). You can deploy and run this application (using the exact same unmodified application code) on your desktop, within a browser, and on the mobile emulator (as well as on many MSA-compliant phones - coming soon) with the touch of a button. It will give you a good idea what JavaFX is and how to get started with it.
I will be doing a screencast on this and other demos soon but for now here are the step-by-step instructions:
- Step 1 Download the latest Java 6 SDK Update 11 and install it
- Step 2 Download the latest NetBeans 6.5 with JavaFX 1.0 bundle ("Download Now") and install it
- Step 3 Start NetBeans 6.5
- Step 4 Create a new project called "Local Search" from the built-in samples (NetBeans menu: File>New Project>Samples>JavaFX>"Local Search") and hit "Finish" in the dialog to create the project
- Step 5 In the NetBeans "Project View" panel, right-click on the "Local Search" project and select "Properties". In the "Project Properties" dialog select the category "Run" and make sure "Standard Execution" is selected. Click "OK"
- Step 6 In the NetBeans toolbar click the big green run triangle (run button).
- Step 7 After a few seconds you will see a little window come up titled "Coffee Shops (1 of 5)". Here you can punch in a zip code and search for coffee shops in that location. The application actually does a RESTful web service call out to Yahoo! to retrieve live information. Clicking on the right and left arrows scrolls horizontally through the list of search results. Finally, hit the "X" close button.
- Step 8 Now run the same application in your web browser. In the "Project Properties" dialog (step 5) category "Run" now select "Run in Browser" and click "OK"
- Step 9 Again, click the run button in the NetBeans toolbar. After a few seconds a browser window will open, load the applet, and present the exact same application as before - but now running in your browser. No changes to the application code were necessary.
- Step 10 Now run the same application in the mobile emulator (sorry, at this point the mobile emulator is only available on Windows - so Mac users can't do this step right now). In the "Project Properties" dialog (step 5) category "Run" now select "Run in Mobile Emulator" and click "OK".
- Step 11 Hit the run button in the NetBeans toolbar. After a few seconds the mobile emulator will open and the application is loaded. Again, we see the exact same application as before - but now running on a MSA-compliant emulator. Again, same application code as before.
- Step 12 Open the file Main.fx in the NetBeans editor and browse the code to get a feeling for the anatomy of a JavaFX application.
As you can see JavaFX is a whole new ball game with many new exciting features and possibilities. I'll be talking about this and more over the next couple of weeks - especially with a focus on mobility.
Finding out more
Have fun playing with JavaFX!
PS: For Linux and Solaris support see the JavaFX blog .
Update regarding running JavaFX applications on real devices
I spoke too soon regarding the ability to run the resulting JavaFX app not only on the mobile emulator (as in step 11) but also on off-the-shelf MSA-compliant devices. Running on phones was supported in internal prerelease versions of the tool chain but that feature is a work in progress and was not considered ready for the JavaFX 1.0 release - so it was removed. Unfortunately, I got mixed up with versions and it looks like I tested my instructions using a prerelease version ...
So, for now at least, running on real devices is not supported. But let me ensure you
- It works (I'll post some videos as soon as I get around to it)
- It's coming very soon - we in the process of completing the functionality and adding performance tweaks
In the meantime I encourage you to start experimenting with JavaFX Mobile using the emulator - it's where the platform is going. Sorry for the confusion and stay tuned.