In addition to the support for JavaFX Script in the NetBeans IDE, there is also an Eclipse plugin. Developers can now kick the tires of this new extension of the Java platform in their favorite IDE. At a glance the Eclipse plugin is not as sophisticated as the NetBeans one, however the deployment support is invaluable. One can build and application and just before deploying it, can choose to do this in the browser, desktop or the mobile emulator.
Users should download the official documentation. More advanced users could use the instructions below:
Table of content
- Install JavaFX SDK
- Install Eclipse
- Install Plugin
- Hello World
- Creating JavaFX Project and configuring JavaFX SDK
- Adding files
- Configuration options
- JavaFX Help
Download and install the JavaFX SDK for
Mac Os X.
Plugin require Eclipse 3.4 or newer. We recommend downloading
Eclipse IDE for Java EE Developers for
Mac OS X. Then follow the installation instructions.
- Download plugin:
- Unzip into eclipse installation directory
- There should be new files in
- Run Eclipse
Start eclipse. You will see the basic layout of workbench.
In Package Explorer view click right mouse and select
Create new JavaTM project.
MyJavaFXProject and press button.
The new project appears in Package Explorer.
Open project popup menu and select
The JavaFX perspective is activated. If this is first time you are adding
JavaFX nature into Java Project you will be asked for setting up
To set up
JAVAFX_HOME property follow steps bellow:
If you select button on error dialog you will skip this setup and
system will never ask you for this again. To setup this later just follow this instructions.
on message dialog. No thanks, I preffer button.
You should see dialog below with
JAVAFX_HOME set to
button on right side to bring up edit window.
button and select installation folder of JavaFX SDK.
Press Folder Selection dialog,
press on Edit Variable Entry dialog.
Press Preferences dialog.
JAVAFX_HOME variable has been set up.
Voila! you have first JavaFX Project.
Expand MyJavaFXProject. Left click on src folder.
Then select and type into
package name com.sun.eclipse.example.
Left click on src/com.sun.eclipse.example folder.
Then select .
The New File wizzard will appear.
Type Main into field.
button and empty new JavaFX script is created.
Let's focuse on Snippets view. There is a lot of code snippets to help you develop
your application. Expand and select
Drag Insert Template: Stage
dialog appers. Change title into Hello World!.
into editor window and drop. The
button to insert template result into source code. Done
Running application in Eclipse is very easy.
button on toolbar to lunch application.
If you are running first time the Edit Configuration dialog appears.
All options are setup to default values. The most interesting part is
option. Here you can set up execution environment.
Possible options are:
- Desktop profile - Run as Application
- Desktop profile - Run as Applet
- Desktop profile - Run with WebStart
- Mobile Profile[?] - Run in Emulator
Press Run to start application. The console window will appear notifying you about progress of execution.
Building is in Eclipse platform provided automatically. For more building options open
Select project in Package Explorer, right click and select
The Properties dialog appears. Select .
Here you can edit several default parameters used during execution and deployment process of JavaFX Project.
For more information about meaning of available options see JavaFX Packager Documentation.
Plugin provide easy acces into JavaFX SDK documentation. You can invoke help by
Ctrl + F1