How to force javaFx application use gtk3 libs? I know that SWT allows to set SWT_GTK3=1
environmental variable for that purpose. Is there any similar possibility / workaround for javaFx?
[ Also on InfoWorld: The best open source software of 2021 ] "There are a number of Java packages that use GTK. These include AWT/Swing, JavaFX, and SWT.
JavaFX is a Java library that consists of classes and interfaces that are written in native Java code. The APIs are designed to be a friendly alternative to Java Virtual Machine (Java VM) languages, such as JRuby and Scala. FXML and Scene Builder.
JavaFX Is JavaThe integration of back-end services is both protocol- and technology-agnostic. Services involve various configurations such as IP addresses, ports, and property files. And the methods of the APIs often throw protocol-specific exceptions such as java. rmi.
JavaFX uses GTK2 libraries and is unlikely to switch in the near future. Here is the related issue - https://javafx-jira.kenai.com/browse/RT-35264
UPDATE: the JavaFX bugs are now on bugs.openjdk.java.net:
in the last issue there is a comment
Since mixing GTK2 and GTK3 in the same application causes this problem, we might have to deliver two native libraries, one for GTK2 and one for GTK3
So, in the long run (JDK 9 release) it might be possible to run against GTK3
== UPDATE (11.05.2016)
New feature (8087516: Conditional support for GTK 3 on Linux) allows us to use either GTK v2 or 3 with JavaFX. The default has not changed - gtk 2 will be used by preference.
-Djdk.gtk.verbose=true // Output the version detected and used
-Djdk.gtk.version=3 // Toggles the preferred version to GTK 3
More details can be found here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With