General Questions

1.1 What is JavaFX?


JavaFX is an expressive rich client platform for creating and delivering rich Internet experiences across all screens of your life. The first version of JavaFX was initially released on December 4, 2008. As of June, 2009, there had already been over 400,000 downloads of the tools and SDK and JavaFX is available on over 250 million desktops.

JavaFX is fully integrated with the Java Runtime and takes advantage of the performance and ubiquity of Oracle's Java Runtime Environment that is installed on literally billions of devices worldwide. In addition, JavaFX fosters a productive and collaborative developer-designer workflow.

Developers and designers can use JavaFX to imagine, create and express a real experience that jumps out of the browser and into our day-to-day lives. JavaFX powerfully combines a scripting language (JavaFX Script), a rich client platform and a set of tools that enable a complete, productive and collaborative developer-designer workflow.

Developers can start building expressive content with JavaFX by downloading the JavaFX SDK from http://www.javafx.com. Designers can download the JavaFX Production Suite to obtain tools to simplify collaboration with developers.

1.2 What is the relationship between Java and JavaFX?


JavaFX is an expressive rich client platform for creating and delivering rich Internet experiences across all screens of your life. It is fully integrated with the Java Runtime and takes advantage of the performance and ubiquity of the Java Platform. JavaFX applications will run on any desktop and browser that runs the Java Runtime Environment and easily integrates with Java ME, opening up the door to billions of mobile phones, televisions and other connected devices!

JavaFX applications are written using a statically typed, declarative language called JavaFX Script that makes it easy to program in a visual context thus enabling developers to create highly expressive GUIs quickly and easily. JavaFX provides a rich set of libraries for graphics, media and Web services that developers can use in their applications. In addition, developers can use any Java library in their JavaFX applications. This allows JavaFX applications to take advantage of the rich JavaFX UI libraries, as well as the amazing breadth of functionality offered by Java.

1.3 What are the components of the JavaFX platform?


The JavaFX platform includes the following components:

  • The JavaFX SDK: Includes the JavaFX compiler and runtime tools, graphics, media, web services, UI controls and rich text libraries to create RIAs for the desktop, browser, mobile and television platforms.

  • NetBeans IDE for JavaFX: Provides a sophisticated integrated development environment for building, previewing, and debugging JavaFX applications. The editor features a drag-and-drop palette to quickly add JavaFX objects with transformations, effects and animation. The IDE also comes with its own set of JavaFX samples and best practices.¢

  • JavaFX Production Suite: A suite of tools and plugins for creative tools that allows graphical assets to be exported to JavaFX applications. The suite consists of:

    • JavaFX plugins for creative tools: A set of plugins for Adobe Photoshop CS3 and Adobe Illustrator CS3 & CS4 that can export graphics assets into a JavaFX compatible file format

    • JavaFX Media Factory: A set of tools to convert SVG graphics into JavaFX Script code and preview graphics assets converted to JavaFX from other tools. Sample applications, tutorials, articles, API documentation, and sample code

1.4 What's new in JavaFX 1.3?


  • New and enhanced support for UI controls, CSS, and programmatic layout

  • Performance improvements in the JavaFX Runtime

  • A native JavaFX font family called Amble

  • Support for the development of TV applications, including a new TV emulator

  • Enhancements for mobile applications, with the availability of the mobile emulator on the Mac platform

  • Support and improved editing features in NetBeans IDE 6.9 Beta

  • New features and enhanced performance in JavaFX Production Suite

For more details, please review the What's new in JavaFX 1.3 document.

1.5 Why should developers choose JavaFX?


  • Expressive RIA platform for all screens: Unified development and deployment model for building expressive RIAs with graphics, video, audio, animation, and rich text across desktop, browser, mobile and television

  • Investments in Java preserved: Leverage skills you already have and reuse existing Java libraries in JavaFX applications

  • Designer-developer workflow: Dramatically shortened production cycle for designers and developers

  • Powerful runtime: Leverage the extreme ubiquity, power, performance and security of Java runtime

  • Ready-made mass market: Widely distribute RIAs quicker and easier across billions of devices

  • Cross-browser compatibility: JavaFX applications look and feel consistent across all browsers on multiple platforms

  • Break free of the browser: Drag-and drop a JavaFX application from the browser to deploy to the desktop

  • Access more device functionality, securely: Unlike other web technologies, JavaFX applications get broader system access with the proven Java security model

  • Next-generation mash-ups: Web services support allows rapid development of mash-ups and enterprise applications

  • Enterprise integration: Rapidly integrate rich client UI with complex back-end enterprise applications


JavaFX in Devices

2.1 Who benefits from JavaFX in Devices?


Consumers today expect richer experiences on their mobile devices while ensuring that their content works well in bandwidth-constrained network environments, offline modes, and with simplified input devices. However, creating content for mobile and television devices typically requires highly specialized programming skills that many content and service providers may not have in-house. Moreover, as companies look to deliver their content and services to consumers across all of their devices (Mobile, Desktop, TV, etc) they are looking to do so with a consistent and device appropriate user experience. Developers want an easier way to create rich and expressive content for devices and want to be able to collaborate with team members such as graphics designers and media authors in an efficient manner that allows simple exchange of audio, video and other rich media assets. Device Manufacturers want to enable richer experiences while leveraging their existing technology investments. Thus everyone from device manufacturers to service providers to developers to end consumers benefit from the combination of Java and JavaFX.

2.2 What is JavaFX Mobile?


With JavaFX Mobile, Oracle is bringing expressiveness to the most powerful and pervasive mobile platform. On mobile devices, JavaFX runs directly on Java ME to take advantage of its ubiquity, security, and highly capable feature-set. According to Ovum Research, there are over 2.6 Billion Java-based handsets in use, worldwide. 8 out of 10 handsets shipped in 2008 were running Java technology, spanning low-end feature-phones to high-end smartphones. Through the Java Platform, developers can enable their applications to securely access all of the capabilities of the underlying handset, such the filesystem, camera, GPS, bluetooth and more!

With JavaFX Mobile, developers and designers benefit from using the same JavaFX tools such as the JavaFX SDK and the JavaFX Production Suite. that they have been using to create content for the desktop and browser. This makes it much easier to start creating mobile content and opens up the mobile device to a much wider pool of developers and designers.

2.3 How can consumers get JavaFX on their handsets and TV devices?


Oracle will be working with Device Manufacturers and Operators to enable out of the box support for JavaFX content by preloading the JavaFX Mobile runtime with their devices. Support for developing Mobile and TV applications is available in the JavaFX SDK today.

2.4 How does JavaFX Mobile compare with platforms such as Android, iPhone, or Windows Mobile?


Building on top of Java ME, JavaFX Mobile brings expressiveness to the most powerful and pervasive mobile platform. As such, JavaFX Mobile enables the mobile industry to extend & leverage their investment in wireless Java. Developers can build more expressive experiences while using existing skills, tools and libraries. OEMs and Operators can extend their platform implementations and developer programs while opening the door to richer, vibrant content and expanding the number of people that can create content for their devices.

In addition, JavaFX Mobile is an independent application platform, built on Java, that is capable of running across nearly any mobile operating system, including Android, Windows Mobile, and proprietary real-time operating systems. In addition, the JavaFX platform spans desktop, browser and mobile, enabling developers and designers to create consistent, expressive content across all the screens of our lives.

2.5 Can JavaFX applications run on an Android handset?


JavaFX is capable of running on nearly any mobile operating system, assuming the necessary runtime files have been preloaded on the device. Device manufacturers that are interested in including JavaFX Mobile with their Android-based handsets are encouraged to contact Oracle for further details.

2.6 Is JavaFX an OS or an Application Platform?


JavaFX is a platform for developing rich, expressive content that can be deployed across desktop, mobile and television. Content written in JavaFX runs on top of the Java platform. On mobile and television, this means JavaFX apps will run on Java ME, opening the door to bringing JavaFX to billions of devices.


Content Development

3.1 How does JavaFX change the way Java developers create content?


Developers can use any Java library in their JavaFX applications. This allows JavaFX applications to take advantage of the rich JavaFX UI libraries, as well as the amazing breadth of functionality offered by Java. JavaFX applications are written using a statically typed, declarative language called JavaFX Script that makes it easy to program in a visual context thus enabling developers to create highly expressive GUIs quickly and easily. JavaFX provides a rich set of libraries for graphics, media and Web services that developers can use in their applications.

JavaFX script is easier to learn, easier to implement, and easier to communicate with. Powered by powerful authoring tools, artists and developers can collaborate in a whole new way. Think about the artists or designers who are changing directly the animation or sprites of the game characters or background images without the help of software engineers.

3.2 What kind of applications can be built with JavaFX?


  1. Enterprise dashboards that do extensive data visualization

  2. Media-rich applications such as media players and dashboards that run on all screens

  3. Learning software for web-based instruction

  4. Games that run on desktops, browsers, mobile and television devices

  5. Mash-ups that integrate different web-based data sources

  6. GUI for business applications that integrate with complex back-end systems

  7. Web sites that make use of highly graphical and animation rich UI elements

  8. Individual productivity applications e.g., calendars and to-do lists that run across all screens

3.3 Where do JavaFX applications run?


JavaFX is fully integrated with the Java Runtime and takes advantage of the performance and ubiquity of Oracle's Java Runtime Environment that is installed on literally billions of devices worldwide. Hence, JavaFX applications will run on any desktop, browser, mobile, television or any other connected device that runs the Java Runtime Environment.

JavaFX applications can run on any Windows or Mac OS X desktop running Java 1.5 or higher. The JavaFX platform includes emulators to enable developers to create and test JavaFX Mobile and TV applications directly on their Mac OS X (mobile only) and Windows desktops. The JavaFX runtime for mobile and television devices is available to Operators and Device Manufacturers for deployment today.

3.4 Do I need to install a JavaFX runtime or plugin to run JavaFX applications?


No, there is no separate installation of JavaFX runtime or plugin required to run JavaFX applications on desktops and browsers. The JavaFX Desktop Runtime will be automatically downloaded on Windows, Mac OS, Linux, and Open Solaris desktops and browsers that support Java 1.5 or higher when users access a JavaFX application for the first time.

3.5 Is JavaFX supported on Linux and Solaris?


The JavaFX Desktop Runtime is fully supported on Microsoft Windows and Mac OS X desktops. In addition, Oracle has released a beta SDK and Desktop Runtime for OpenSolaris and Ubuntu Linux with the JavaFX 1.2 platform release. Oracle will be including full support for these platforms in a future release.

3.6 Why do I see two security dialogues when using JavaFX content on Mac OS X for the first time?


Security dialogues are presented when accessing signed content that is not trusted by your system. This policy is designed to protect you by letting you decide whether you feel comfortable running content that could potentially compromise the security of your system. Content signed by an authority that is trusted by the system will run seamlessly without displaying a dialogue.

When first running JavaFX 1.1 (or earlier) content on Mac OS X, users were presented with a security dialogue requesting permission to allow the JavaFX runtime to run. If the applications were signed, this would have resulted in two security dialogues requests. With JavaFX 1.2 and beyond, users see a friendly looking splash screen that requests permission to trust the JavaFX runtime certificate the very first time they run JavaFX content. This ensures that subsequent access to JavaFX content will be free of security dialogues—unless of course the content has been signed by an untrusted authority.


Language

4.1 What is JavaFX Script?


JavaFX Script is a simple declarative language designed for creative developers who like to program in a visual context. It's easy-to-learn and familiar syntax allows content authors to write in a format that closely matches the layout of graphical user interfaces. A core strength of the language is it's unique data binding feature, which is a simple syntax for synchronizing the state of multiple objects, thus allowing GUI components to automatically change state with changes in underlying data. The language is fully object-oriented, complete with method and attributes, thus allowing expert programmers to build highly complex and robust interfaces.

4.2 Why did Oracle create a completely new language? Why didn't Oracle just build the features in Java?


The JavaFX platform is architected to support multiple scripting languages, and based on customer demand, can be extended to support ECMA-based languages as well as XML-based visual markup languages.

JavaFX Script is designed for web scripters and content authors who like to program in a visual context. It is easy to learn and provides a simple, declarative syntax that will appeal to Web developers. JavaFX brings together graphics, animation, rich text, audio, and video to quickly allow developers to create rich, immersive applications. The Java programming language, on the other hand, is more suited for applications that are heavy in logic and require extensive back-end integration.

JavaFX also enables a highly efficient designer-developer workflow. Hence JavaFX extends the power of Java by providing your Java applications with a more powerful and expressive presentation layer.

4.3 What are the advantages of JavaFX Script over JavaScript and ActionScript?


JavaFX Script is a scripting environment that is better suited than JavaScript or ActionScript to take advantage of Java's ubiquity on the desktop, mobile and television devices, as well as on other consumer electronics. With JavaFX Script developers can provide deep integration with the Java Runtime environment by reusing any Java Library in a JavaFX application.

In addition, JavaFX Script is primarily designed for web developers and technical designers who like to program in a visual context. And at the same time, the language is fully object-oriented, complete with method and attributes, thus allowing expert programmers to build highly complex and robust interfaces.

4.4 I currently build applications in Java. Can I reuse my Java libraries in JavaFX Script?


Yes. You can leverage the power of Java by using any Java library within a JavaFX application. This way you can preserve your investment in Java and use JavaFX to build engaging visual experiences.

The proven security model of Java can be leveraged to securely deploy JavaFX applications and access system resources such as file system and system devices. And because JavaFX applications are compiled to Java byte-code, they take advantage of the dynamic Java HotSpot Virtual Machine to get the best possible performance.


Graphics & Media

5.1 Is JavaFX replacing Swing as Java's client UI library?


No. JavaFX is a rich client platform for building expressive RIA for multiple screens such as the desktop, browser, mobile and television. Whereas Swing is a set of extensible GUI components that enable developers to more rapidly develop powerful Java front ends for desktop-based commercial applications. JavaFX applications that are designed for desktop environments can take advantage of the powerful Swing widget toolkit to build RIA that are optimized for the desktop.

5.2 How do you create and use cross-platform media with JavaFX technology?


Cross-platform media refers to video and audio content that can be played across desktop computers, mobile phones and television devices. JavaFX provides a common set of APIs that make it easy to include media playback across all JavaFX enabled devices. JavaFX leverages the underlying media frameworks on each supported platform and device and enables access to all native codecs.

In addition to using native codecs provided by each platform, Oracle has partnered with On2 to use the On2 Video VP6 decoder with JavaFX technology for media playback. The VP6 decoder enables you to play FXM media on Windows and Mac OS X desktops and browsers without installing additional software. You can convert any media format (wmv, mov, and other formats) to FXM by using On2 Flix software. You can download the 30-day trial version of the On2 Flix software. The On2 Flix Desktop Software Specification describes the capabilities of the product.

5.3 Can I include media in my JAR file?


No. Distributing media in JAR files is not efficient and is therefore not supported at this time. However, explorations of this capability for small media files (such as short audio/video clips) might lead to this support in the future.

Media files tend to be large, so you'll want to carefully consider how to distribute media content to your audience. You don't want users to wait for long periods of time while downloading files, for instance, which would certainly be the outcome for media packaged in the JAR. Also, as media files are already compressed, packaging them in additional compressed formats like .zip or .tar files can actually result in increasing the file size.

You are strongly urged to leverage the streaming capability in JavaFX technology. Because JavaFX Media supports streaming audio/video, you can achieve very short download times (for just the application) and take advantage of the streaming capability to play media content. The streaming capability will result in much higher performance and improved usability of your applications.

5.4 Why won't the Java Store work with Mac OS X 10.4?


Mac OS X 10.4 with JDK 1.5.0_16, contains a URL resolution conflict with Java Web Start which prevents the launching of some JavaFX applications, including the Java Store, which rely on externally referenced graphics.


Web Services & Networking

6.1 What type of Web services can I call from JavaFX applications?


JavaFX applications can call RESTful Web services, as well as support for reading ATOM and RSS feeds. JavaFX also includes an API for making asynchronous HTTP requests and a parser API for XML and JSON.

6.2 How does JavaFX handle cross-domain network requests?


Ordinarily, unsigned JavaFX Scripts may only connect back to the web server from which they originated. This restriction prevents a Script from causing denial-of-service attacks by making rapid connections to arbitrary machines on the Internet. Web servers now have facility to selectively open up their data to some clients via the use of a policy file called crossdomain.xml.

The ability to check this file has been added to the JRE Version 6 Update 10 and also to JavaFX Desktop runtime (version 1.1 or above), additional information about CrossDomain XML can be found via the J2SE Plugin 6u10 Release Notes at: http://jdk6.dev.java.net/plugin2/#CROSSDOMAINXML


Tools & Resources

7.1 What tools are available to build applications with JavaFX?


You may use NetBeans IDE for JavaFX for developing JavaFX applications. It can be downloaded from http://www.javafx.com. To build JavaFX applications using another IDE or code editor, download just the JavaFX SDK without the NetBeans IDE. The SDK provides the compiler and runtime libraries required for building JavaFX applications.

Graphics designers may download the JavaFX Production Suite in order to better collaborate with developers. They can use the JavaFX Production Suite to export graphical assets directly from creative tools such as Adobe Photoshop and Adobe Illustrator into JavaFX format. The exported assets can be easily incorporated into JavaFX applications by developers.

  • NetBeans IDE for JavaFX: Provides a sophisticated integrated development environment for building, previewing, and debugging FX applications. The editor features a drag and drop palette to quickly add FX objects with transformations, effects and animation. The editor also comes with its own set of samples and best practices

  • JavaFX Production Suite: A suite of tools and plugins for creative tools that allow graphical assets to be exported to JavaFX applications. The suite consists of

    • JavaFX plugins for creative tools: A set of plugins for Adobe Photoshop® CS3 & CS4and Adobe® Illustrator® CS3 & CS4 that can export graphics assets from the creative designer tools to a JavaFX compatible file format

    • JavaFX Media Factory: A set of tools to convert SVG graphics into JavaFX Script code and preview graphics assets converted to JavaFX from other tools. Sample applications, tutorials, articles, API documentation, and sample code

7.2 What is the JavaFX designer-developer workflow?


The JavaFX Production Suite gives designers and Web developers an iterative and collaborative workflow for creating rich JavaFX applications and content. Designers create static graphic assets in Adobe Photoshop or Adobe Illustrator and export them into JavaFX format. Web developers then use the generated JavaFX format assets and add animation, effects and data binding to incorporate the graphic assets into applications. Layers and structure of the graphic assets are preserved even after assets are exported to JavaFX format, thus allowing developers the flexibility to create rich, complex visual interactions.

7.3 What versions of Adobe Photoshop and Adobe Illustrator are supported by the JavaFX Production Suite


Support for Adobe Creative Suite 3 has been available since the JavaFX 1.0 platform release. The JavaFX 1.2 platform added official support for Adobe Photoshop CS4 and Adobe Illustrator CS4.

7.4 When will Oracle release the JavaFX Authoring Tool?


At JavaOne 2009, Sun (now Oracle) demonstrated a preview of the JavaFX Authoring Tool. The JavaFX Authoring Tool is currently under development. Formal availability will be announced in the future.

7.5 How do I get the JavaFX Runtime?


The JavaFX Desktop Runtime will be automatically downloaded and installed on Windows, Mac OS X, Linux, and OpenSolaris desktops and browsers that support Java 1.5 or higher when users access a JavaFX application for the first time - there is nothing an enduser would need to download and/or install. The JavaFX runtime will be automatically updated on the user's desktop for subsequent releases JavaFX SDK includes emulators to enable developers to begin creating JavaFX content for mobile and television devices. The JavaFX Mobile and Television runtimes are available to Device Manufacturers and Operators as of February and Companies interested in preloading JavaFX with their devices should contact Oracle for more details.

7.6 Is there a JavaFX plugin for Eclipse IDE?


Oracle has released an open source JavaFX plug-in for eclipse. Developers using the Eclipse IDE can download a plugin for JavaFX from the JavaFX Plugin for Eclipse community project. If you are interested in learning more about JavaFX for Eclipse, you can read more about it here: http://www.javafx.com/docs/gettingstarted/eclipse-plugin/index.jsp

7.7 How do I verify that I have JavaFX installed?


Follow the instructions at http://www.java.com/en/download/help/javafx_install.xml

7.8 How do I submit a bug report or request a feature?


If you believe you've found a defect in JavaFX and would like to submit a bug report, or if you would like to suggest a new feature or feature enhancement to the platform, you can do so by visiting and creating an account at http://javafx-jira.kenai.com. Once you have logged in, select "create new issue" from the top navigation bar on the page. Next, select the project that is most appropriate for your issue (don't worry, we will fix it if you pick the wrong one) and select whether you are submitting a bug or a feature request. Follow the instructions on the page to give us as much information as you can. If we need anything else from you we will contact you for more details, but the more you can tell us ahead of time, the better!


Performance

8.1 How do I make a JavaFX application start up faster?


Add the following line to the JNLP file:

<jnlp> 
<update check="background"/> 
</jnlp>