How to setup JavaFX 2.2 / 8 develop environment

By WZh June 2015

0. Clear about two ways to create JavaFX project UI:

1. pure java way like the Swing coding;

2. FXML+ controller java, this is MVC model to make UI XML seperate with the logic code. can be used in complex  project.

1. Clear about the major version relations:

Version 2.2 combination:     JDK 7u6 up + JavaFX 2.2 +  Scene Builder 1.1 version.

Version 8 Combination:
JDK 8 + JavaFX 8 +  Scene Builder 2.2 version.

2. IDE choice is for netbean  and eclipse.

  1.     Netbean has better support, such as you can create a JavaFX application.
  2.     If you use JDK 8, then here is tools for Eclipse + e(fx)clipse plugin, this plugin only support the Version 8.
  3.     if you use verison 2.2 , then there is no plugin for eclipse.
 So tools combination like this:
  •     Netbean + Scene Builder.
  •     Version 8 : Eclipse + e(fx)clipse plugin + Scene Builder 2.2 version + JDK 8
  •     Version 2.2 : Eclipse + Scene Builder 1.1 version + JDK7u6    — for this choice, you need set up two things:

1. you need to add jfxrt.jar to your project to let your project can run javafx 2.2

2. you can create a file type association in eclipse to make *.fxml file can be opened by the SceneBuilder automatically from eclipse.

So : Scene builder is for GUI design for FXML file and eclipse or netbean is used to design the controller and other java files.

If you do not using FXML way, just want use pure java code to code the FX, you do not need the SceneBuilder.