JavaFX and JCEF in the IntelliJ Platform
We want to give you an update regarding the status of the JavaFX runtime and JCEF in the IntelliJ Platform.
Starting with version 2020.2 of the IDE, which will be released at the end of July 2020, we are no longer bundling JavaFX with the default JetBrains Runtime. As an alternative to these APIs, we now provide integration with JCEF, which is a Java port of the CEF framework for embedding Chromium-based browsers in applications using Swing.
If you’re thinking about developing a new plugin or adding new features to an existing plugin, JCEF can offer you a new easy way to display web content in the IDE. Here are the docs to help you get started.
If you’re developing a plugin that uses JavaFX APIs to implement its UI, read on to learn about several things you can do to make it possible to use the plugin in version 2020.2 of the IDEs.
Deprecation of JavaFX APIs
Using JavaFX (via JFXPanel) for implementing UIs in Swing applications has some known limitations that are causing performance and rendering issues.
We’ve made the decision to deprecate support for the JavaFX runtime for plugins in the IntelliJ Platform before the end of 2020.
Even though it will still be possible to use plugins that rely on JavaFX in the IDE, several changes are going to be made starting with version 2020.2 of the IDE:
- The JavaFX runtime will no longer be shipped with the IDE starting from version 2020.2.
- It can be added to the IDE with the JavaFX Runtime for Plugins plugin (more on that below).
JavaFX.*APIs will no longer be maintained and tested.
- Problems caused by the use of these JavaFX APIs will most likely not be fixed.
Migration from JavaFX APIs to JCEF
As an alternative to these APIs, we are providing a new integration with JCEF.
In version 2020.2 of the IDE, end users will be able to run plugins that use JCEF APIs. We believe that JCEF is a great alternative to JavaFX because it will provide better stability and performance and will also make it easier to implement new features that display web content in the IDE.
You can find more information about JCEF APIs available in the IntelliJ Platform in these docs.
We strongly recommend that you migrate your plugin from the JavaFX APIs for UI to JCEF or Swing UI.
Adding JavaFX Runtime for Plugins as a plugin dependency
Plugins can also continue to use JavaFX APIs with the limitations listed above. The required JavaFX 11.0.2 Runtime will be available as an IDE plugin.
Please add this plugin as a direct dependency of your plugin to make sure it is downloaded automatically when users install your plugin.
To do so, add
<depends>com.intellij.javafx</depends> to the plugin.xml file of your plugin.
Update, February 2021:
Starting February 2021, we will no longer release JetBrains Runtime builds with JavaFX. The versions of JetBrains Runtime with JavaFX (look for the
jbr-jfx prefix in the name) will still be available for download on Bintray.
The JetBrains team