Wednesday, May 9, 2012

Getting Started with JavaFX 2.0 in Eclipse IDE

You want to start developing JavaFX 2.0 applications, but you don't know what software is required to be installed, then this is right JavaFX tutorial for you.

You will need to install the following software in order to get started with JavaFX 2.0:

  •  Java 7 JDK or greater 
  • JavaFX 2.0 SDK
  •  Eclipse IDE or NetBeans IDE 7.1 or greater

Download and Install
Download software from these links:
Installing process is pretty easy, as any other typical software installation, so I won't explain it.

Setting up Eclipse IDE for development
When you finish installing all of these files, follow the steps below to start developing your first JavaFX 2.0 application. First application will be "Hello, World", because it's best example for starting learning any programming language. Before that, we need to configure Eclipse IDE, so follow the steps below.

  1. Open Eclipse IDE
  2. In the File menu, select New Project and then select Java Project, and specify HelloWorld for your project name.This is described in Image 1.
  3. Image 1

  4. Project -> Properties -> Java Build Path -> Libraries -> Add External Jars and add jfxrt.jar   Here is my location of that file: C:\Program Files\Oracle\JavaFX 2.0 Runtime\lib 
    This is described in Image 2 and Image 3.

Image 2

Now you are ready for writing JavaFX 2.0 code for Hello, World application.



  1. Why not use e(fx)clipse ( - your setup has multiple problems:
    a) you can't use it e.g. on other platforms or installs because you use an absolute path
    b) you did not configure the JavaDoc => autocompletion will e.g. only insert arg0, arg1, ...

    All those are solved by e(fx)clipse including e.g. exporting your application. Naturally I'm biased because I'm the author but well.

  2. Thanks for the comment. I am glad that you provided some useful critics. I'll take a look at e(fx)clipse, and if I find it useful and good I'll write some tutorials about it.

    And at the end if you have you something else to comment feel free to do.

  3. Nice article. For more articles on JavaFX You can try this link

  4. Thanks :)

    Feel free to share any article from this blog on that site.

  5. Nice article there is a config that lets you specify just the javafx sdk path and eclipse does the rest auto wiring, but that was some time ago

  6. good!! also see this tutorial for better learning