CS 3443 - JavaFX
JavaFX comes with the JDK 1.8+, however SceneBuilder and Eclipse plugins are needed to set up your workspace.
Note: on the CS VDI, you need only install the JavaFX plugin for Eclipse.
Install the Eclipse JavaFX plugin
- Install Eclipse
- In Eclipse, Help, Install New Software
- In the drop-down menu (next to "Work with:"), choose the release site
In Eclipse Mars, this is "Mars - http://download.eclipse.org/releases/mars"
- Filter the list by typing "fx" in the textbox below.
- Click the checkbox for "e(fx)clipse - IDE"
- Click Next through the installation
- Restart Eclipse
- Download the installer: http://www.oracle.com/technetwork/java/javafxscenebuilder-1x-archive-2199384.html
- Download and install SceneBuilder 2.0
Note to Linux users:
If you have followed these instructions, restarted your computer, and found that Eclipse does not recognize JavaFX import statements in a project, install OpenJFX using the following command:
sudo apt-get install openjfx
To test out your installation of JavaFX and SceneBuilder, do a "Hello, World" exercise:
Completing this test generates the basic code for "hello, world", and running it displays a small white window.
- Create a new JavaFX Project: File - New - Other - JavaFX Project
- Run this as a Java application
If this basic example program does not work for you, ensure you have followed the necessary steps for installation.
If that is working, let's make this example a little more interesting by adding GUI components.
Import this example project (HelloJavaFX) into Eclipse (File - Import - Existing Project into Workspace).