How to Install JavaFX on Eclipse

install javafx

Today I am going to teach you how to install JavaFX in Eclipse.  Try to install the latest version of Java on your computer. You can find it here : Latest Java Version

And then you can check it by opening your command prompt and writing java -version

javafx cmd java version


The next step is to open Eclipse -> Help -> Install New Software

install new software javafx

It will open a new window on your eclipse and will ask you for a name and a location where to find this new software that you’re about to install.

In the name field enter : ec(fx)lipse

In the location field enter this link :

Here are all the .jar files that are needed to install Java FX on Eclipse.

In case you get stuck here is an illustration of this step :


e(fx)clipse javafx

After selecting the 2 components proceed with the installation and restart Eclipse so the configurations can take effect. Now lets take a look what happens after we install it. When you create a New Project , there should also be the option for creating a JavaFX project.

javafx project


After selecting JavaFX Project , click Next , type the project name and you’re ready to go.

Now your project will appear in the projects section on the left. Open it, go to src and you will notice that there is a package named application. And inside there is a file named : Main. This is a basic Java FX class that Eclipse created for us when we installed it.Compile it and you will see a blank window. program

package application;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;

public class Main extends Application {
  public void start(Stage primaryStage) {
    try {
      BorderPane root = new BorderPane();
      Scene scene = new Scene(root,400,400);
    } catch(Exception e) {
  public static void main(String[] args) {


Now, you are good to go and create amazing applications with Java FX. In the next tutorials you will find lots of JavaFX examples.

If you need to get started with Java, you can read this tutorial : Getting Started With Java 

If you have any questions feel free to comment.


Please enter your comment!
Please enter your name here