The JavaFX software development kit (SDK) is a set of core tools needed to compile, run, and deploy JavaFX applications. If you feel at home at the command line, then you can start writing code with your favorite text editor and interact with the SDK tools directly. However, if you want to see code-completion hints after each dot you type, then you can always use an IDE such as NetBeans or Eclipse to get you started with JavaFX (see other recipes on IDEs). This section outlines the necessary steps to set up the JavaFX SDK successfully on your computer. These instructions apply to JavaFX SDK version 1.2.x; future versions may vary slightly.
Before you can start building JavaFX applications, you must ensure that your development environment meets the minimum requirements. As of this writing, the following are the minimum requirements to run the current released version of JavaFX runtime 1.2.
Windows |
Mac OS X |
Linux/OpenSolaris |
---|---|---|
|
|
|
The first step for installing the SDK on you machine is to download it from http://javafx.com/downloads/. Select the appropriate SDK version as shown in the next screenshot.
Once you have downloaded the SDK for your corresponding system, follow these instructions for installation on Windows, Mac, Ubuntu, or OpenSolaris.
Note
Make sure to select the location for your installation. The installer will run a series of validations on your system before installation starts. If the installer finds no previously installed SDK (or the incorrect version), it will download a SDK that meets the minimum requirements (which lengthens your installation).
1. Prior to installation, ensure that your Mac OS meets the minimum requirements.
2. Find and double-click on the newly downloaded installation package (.dmg file) to start.
3. Follow the directions from the installer wizard to continue your installation.
4. The Mac OS installer will place the installed files at the following location:
/Library/Frameworks/JavaFX.framework/Versions/1.2
.
1. Prior to installation, ensure that your Ubuntu or OpenSolaris environment meets the minimum requirements.
2. Locate the newly downloaded installation package to start installation. For Linux, the file will end with
*-linux-i586.sh
. For OpenSolaris, the installation file will end with*-solaris-i586.sh
.3. Move the file to the directory where you want to install the content of the SDK.
4. Make the file executable (chmod
755)
and run it. This will extract the content of the SDK in the current directory.5. The installation will create a new directory,
javafx-sdk1.2
, which is your JavaFX home location($JAVAFX_HOME)
.6. Now add the JavaFX binaries to your system's
$PATH
variable, (exportPATH=$PATH:$JAVAFX_HOME/bin)
.
When your installation steps are completed, open a command prompt and validate your installation by checking the version of the SDK.
$> javafx -version $> javafx 1.2.3_b36
You should get the current version number for your installed JavaFX SDK displayed.
Version 1.2.x of the SDK comes with several tools and other resources to help developers get started with JavaFX development right away.
The major (and more interesting) directories in the SDK include:
Directory |
Description |
---|---|
|
This directory contains tools for compiling, packaging, documenting, and running JavaFX scripts. They include javafx, javafxc, javafxdoc, and javafxpackager. |
|
This directory contains documentation for various JavaFX tools and the JavaFX APIs. |
|
This directory contains tools for JavaFX mobile emulator , which is useful for doing mobile development with JavaFX. As of version 1.2 of the SDK, mobile development is only available on the Windows platform. |
|
This directory contains |
|
This directory contains configuration files for the SDK tools. |
|
This directory provides sample applications to help you get started. |