Monday, August 17, 2009

JavaFX Installation

JavaFX is a unified approach to build rich gui applications for all media from desktop to browser to mobile platforms to TV (TV support is still not out). JavaFX in its functionality stands parallel to Adobe Flash or Microsoft Silverlight. For Java developer, JavaFX comes with the advantage that it uses the capability developed around Java technology. The salient points are:
  • JavaFX application run on standard JRE. On mobiles it can run on JavaME platform. On Internet, JavaFX application use the client's Java environment.
  • JavaFX application are written in a scripting language called JavaFX script. The language itself comes with libraries but it can also reuse any of the features of Java language.
JavaFX download come in different flavor for different needs. The download site is at The different downloads available are:
  • NetBeans IDE 6.5.1 for JavaFX 1.2 - JavaFX plugin preinstalled with NetBeans. If you have the NetBeans already with you, you might just want to download the SDK.
  • JavaFX 1.2 Production Suite - Tools for designers. contains tools to export graphics from Adobe Illustrator or Photoshop or SVG graphics.
  • JavaFX 1.2 SDK - Contains everything including tools and jars for JavaFX. The preferred download for developers.
  • Download JavaFX SDK from Download as per your platform.

  • The download is a .sh file. Make it executable.
  • Run the .sh file and accept license agreement. It will create a folder.
  • The folder has following directories:

bin - contains command line tools for development and execution
docs - documentation
emulator - Mobile emulator (For windows only)
lib - jar dependencies
profiles - properties files for platform
samples - sample applications
servicetag - product registration information

Command Line Tools

If you intend to development using command line tools than have the bin directory in your path. The command line tools which comes with JavaFX are:
  • javafxc - Compiler to run the JavaFX script file
  • javafx - Executing JavaFX applications
  • javafxdoc
  • javafxpackager

Integrating with Eclipse

Download the eclipse plugin for JavaFX. The following steps are for Eclipse Ganymede and Linux (OpenSuse). It should work similarly for other Operating systems.
  • Go to Help->software Updates
  • Click on Available Software tab.
  • Click on Add site button on the right.
  • Enter the URL location and click ok
  • It will create an entry JavaFX updates in the list. Select it.
  • click on install.
  • The eclipse will download the plugin and will prompt to restart eclipse. Restart it.

Once the above steps are followed, you can see JavaFX choice in the New wizard(File->New->Other)

Also JavaFX perspective on perspective windows(Window->Open Perspective->Other) should be present.

More on JavaFX

No comments:

Post a Comment