Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFX on Linux

What is the situation with JavaFX on Linux (x86 and x64)?

Can a JavaFX app be executed without problems on Linux OS?

I have found some questions from years 2011 and 2012, when apps were not stable!

like image 296
Jurica Krizanic Avatar asked Mar 27 '13 08:03

Jurica Krizanic


People also ask

Does JavaFX work on Linux?

The JavaFX SDK runs on Windows and Mac OS X. A beta release of the JavaFX SDK is provided for Ubuntu Linux and the OpenSolaris operating systems.

How run JavaFX application in Linux?

JavaFX Database Management System! From Java8 onwards, the JDK (Java Development Kit) includes JavaFX library in it. Therefore, to run JavaFX applications, you simply need to install Java8 or later version in your system. In addition to it, IDE's like Eclipse and NetBeans provide support for JavaFX.

Why was JavaFX removed from JDK?

JavaFX was removed from JDK since JDK 11. Since JDK 9, java is modular. JavaFX was split into modules. Hence there is no longer a single jfxrt.

Is JavaFX available in OpenJDK?

Up until JDK 10, JavaFX was a part of the JDK. In 2018, Oracle decided to decouple JavaFX from the JDK. JavaFX lives on as OpenJFX, an OpenJDK subproject.


2 Answers

The current version of JFX released is 2.2.4 and it is quite stable on Linux. However, it will become very much better when Java 8 would be released as it would contain JFX 8 distibution. You can try it yourself now using java 8 early access builds.

like image 110
Petr Avatar answered Oct 04 '22 01:10

Petr


JavaFX 8 runs fine on Linux in my experience, the only requirement appears to be libgtk 2.18+. There are full details on Oracle JDK 8 and JRE 8 Certified System Configurations. Working Linux versions include:

  • Ubuntu 10.04 (and possibly earlier, 10.04 had libgtk 2.20)
  • Redhat 6

Possible problems you may encounter

  • 3D scene support - requires specific modern GPUs + recent drivers, note there is no software rendering fallback for this, and no plans to - see mailing list question
  • Video playback requires certain version of libavcodec
  • OpenJDK does not yet include javafx, only the oracle distribution. Update July 2016 - openjfx package now available .on Ubuntu 16.04...
like image 29
Adam Avatar answered Oct 04 '22 01:10

Adam