skip to main |
skip to sidebar
Doing JavaFX on Eclipse:
- Install openjfx plugin for Eclipse
(Help > Software Updates > Find and Install)
URL
http://download.java.net/general/openjfx/plugins/eclipse/site.xml - New Java Project
- New JavaFX file HelloWorld.fx
- Type in the sample code from openfx.dev.java.net
import javafx.ui.*;
class HelloWorldModel {
attribute saying: String;
}
var model = HelloWorldModel {
saying: "Hello World"
};
var win = Frame {
title: bind "{model.saying} JavaFX"
width: 200
content: TextField {
value: bind model.saying
}
visible: true
};
- Right click on the project and Run As JavaFX Application (double click)
- Add argument: HelloWorld

- Here we go:
3 comments:
I could not see "Run As JavaFX"
I ccould only see "Run as Java Application" and "Run as Applet"
make sure to have the openjfx for eclipse plug in installed.
Also I had to reboot eclipse before I could see the "Run As JavaFX" option.
Post a Comment