Vous êtes ici

JavaFX - development environment for Linux

JavaDevelopment Environment - Linux Mint 19.1

I just started a new project using JavaFX. My development VM is now a Linux Mint 19.1 Tessa MATE. Java version is openjdk version "11.0.3" 2019-04-16.

I configured my development environment as follows.

Configuration

Install openjdk-11-jdk package.

Install openjfx package (version: 11.0.2).

Create ~/DevTools folder.

Install IntelliJ IDEA CE:

  • extract archive contents to ~/DevTools folder
  • add a shortcut to Mint main menu

Install Scene Builder:

  • download the Linux deb version for Java 11
  • install it
  • move the menu shortcut from Other to Programming

Configure IDEA for JavaFX:

  • the JavaFX plugin is already installed and enabled, perfect
  • from the Welcome window, select Configure > Structure for New Projects > Project SDK and add the JDK, which is in /usr/lib/jvm/java-11-openjdk-amd64
  • select Configure > Settings > Languages & Frameworks > JavaFX and set Path to SceneBuilder to /opt/SceneBuilder/SceneBuilder

To create a JavaFX project:

  • select New > Project... > JavaFX > JavaFX Application
  • for the project, select Run > Edit Configurations... and set VM options to --module-path /usr/share/openjfx/lib --add-modules javafx.controls,javafx.fxml
  • for the project again, add openJFX libraries: select File > Project Structure... > Libraries and add /usr/share/openjfx/lib

References

Development environment - Linux Mint 18.3

The installation procedure described here was done on a Linux Mint 18.3 MATE with Java 8.

Ensure that Java is installed. If this is not the case, do it, as described in this article for instance. If you use OpenJDK, install the openjfx package.

Download and install the all in one bundle from Best Solution website.

Note: I tried to install e(fx)clipse as documented here. This did not work: I got a never-ending update attempt when creating a new JavaFX project.

Download Scene Builder from here and install it. Then, in the freshly installed Eclipse, set the preference Window / Preferences / JavaFX / SceneBuilder executable to Scene Builder path, which is /opt/SceneBuilder/SceneBuilder for me.

Reference documentation