How to Create a Bare-Bones JavaFX Project
There’s a wise old saying, “A picture is worth 50 words.” And if you count things like javafx.application.Application as three separate words, the same picture is worth 70 words. Here, you create a picture from which Eclipse builds a 70-word Java program.
Make sure you have installed e(fx)clipse.
Launch your new copy of Eclipse and click the Welcome screen’s Workbench icon.
From Eclipse’s menu bar, choose File→New→Project.
The New Project dialog box appears.
In the dialog box’s list, expand the JavaFX branch. Within that branch, select JavaFX project and then click Next.
A New Java Project dialog box appears.
In the New Java Project dialog box, type a name for your project.
If you’re following these instructions to the letter, name the project MyFirstJavaFXProject.
In the New Java Project dialog box, select JavaSE-1.7 or JavaSE-1.8.
You can run JavaFX programs with earlier versions of Java, but life is easier with Java 7 update 7 (JDK 7u7), or later.
Click Finish to close the New Java Project dialog box.
After clicking Finish, you may or may not see a dialog box warning you that Mercurial (whatever that is) is not configured correctly. If you see this dialog box, look for the box’s Restore Defaults button. Click that button and then click OK.
You see the Eclipse workbench with your newly created project in Eclipse’s Package Explorer.