Friday Jul 24, 2009

Eclipse plugin for JavaFX is on the move

We are in the process of moving the Eclipse plugin for JavaFX, from to a more proper place - Eclipse foundation. Developers used to find the plugin at the kenai url, however the download is now available for install in a cleaner way. The process is still a little clunky, however once the plugin becomes an Eclipse project, one would be able to get the plugin through the usual channel, the update center.

Before you can get started with the plugin you'll have to point it to the location of the JavaFX SDK on your computer. Use the preferences (Window | Preferences |  Java | Build Path ...) dialog to set the JAVAFX_HOME varialble. See the screen shot below for more details. In my case the JavaFX SDK has been bundled with NetBeans. No big deal, Eclipse will be able to use this instance.

Wednesday Dec 10, 2008

Eclipse plugin for JavaFX Script

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

  1. Installation
    1. Install JavaFX SDK
    2. Install Eclipse
    3. Install Plugin
  2. Hello World
    1. Creating JavaFX Project and configuring JavaFX SDK
    2. Adding files
    3. Running
    4. Building
    5. Configuration options
    6. JavaFX Help


Download and install the JavaFX SDK for Windows or Mac Os X

Install Eclipse

Plugin require Eclipse 3.4 or newer. We recommend downloading Eclipse IDE for Java EE Developers for Windows or Mac OS X. Then follow the installation instructions.

Install plugin

  1. Download plugin:
  2. Unzip into eclipse installation directory
  3. There should be new files in ECLIPSE_ROOT/plugins and ECLIPSE_ROOT/features
  4. Run Eclipse

Hello World

Creating JavaFX Project and configuring JavaFX SDK

  1. Start eclipse. You will see the basic layout of workbench.
  2. In Package Explorer view click right mouse and select New > Java Project
  3. Create new JavaTM project.
  4. Name it MyJavaFXProject and press Finish button. The new project appears in Package Explorer.
  5. Open project popup menu and select JavaFX > Add JavaFX Nature.
  6. 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 JAVAFX_HOME property.

    To set up JAVAFX_HOME property follow steps bellow:
    1. Press OK on message dialog. No thanks, I preffer Cancel button.
    2. You should see dialog below with JAVAFX_HOME set to (empty) value.
    3. Press Edit... button on right side to bring up edit window.
    4. Select Folder... button and select installation folder of JavaFX SDK.
    5. Press OK on Folder Selection dialog, press OK on Edit Variable Entry dialog.
    6. Press OK on Preferences dialog. The JAVAFX_HOME variable has been set up.
    If you select Cancel 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.
  7. Voila! you have first JavaFX Project.

Adding files

  1. Expand MyJavaFXProject. Left click on src folder. Then select New > Package and type into Name package name com.sun.eclipse.example.
  2. Left click on src/com.sun.eclipse.example folder. Then select New > Empty Script.
  3. The New File wizzard will appear. Type Main into Name field.
  4. Press Finish button and empty new JavaFX script is created.
  5. Let's focuse on Snippets view. There is a lot of code snippets to help you develop your application. Expand Applications and select Stage.
  6. Drag Stage into editor window and drop. The Insert Template: Stage dialog appers. Change title into Hello World!.
  7. Press Insert button to insert template result into source code. Done


Running application in Eclipse is very easy.

  1. Press Run button on toolbar to lunch application.
  2. If you are running first time the Edit Configuration dialog appears.
    All options are setup to default values. The most interesting part is Profile - Target 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
  3. 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 Project menu

Configuration options

  1. Select project in Package Explorer, right click and select Properties.
  2. The Properties dialog appears. Select JavaFX Defaults.
    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.

JavaFX Help

Plugin provide easy acces into JavaFX SDK documentation. You can invoke help by Help > Java FX > JavaFX Script Documentation or press Ctrl + F1


  • Any time you can setup or change the JAVAFX_HOME variable following these steps:
    1. Open Window > Preferences
    2. Expand Java > Build Path and select Classpath Variables
    3. Edit JAVAFX_HOME
  • You can switch profiles in SDK by following steps:
    1. Right click on project name. SelectProperties > Java Build Path > Libraries
    2. Double click on JavaFX System Library. The Edit Library dialog appears. Here you can set up profile to use.

Wednesday Feb 06, 2008

NetBeans tooling for Eclipse developers?

Who would have thought that NetBeans will be building tooling for the Eclipse developer community? Runtime tooling that is. I'll explain shortly. The two communities have been engaged in a healthy competition for the hearts and minds of developers at large, however the focus has been the "design time". One could consider one of the new NetBeans projects as a play for a much broader audience, including developers that are still using Vi/Emacs for their development and are not currently using an IDE.

[Read More]



« July 2016