3

I am running Arch Linux, installed the latest IntelliJ package as well as Oracle's JDK12 (which the project uses) and Gluon's Scene Builder. The path to Scene Builder is correctly set up.

The Scene Builder works stand-alone, also when launching from IntelliJ (I right-click my fxml file and choose "Open in SceneBuilder"). But when I want to use the integrated SceneBuilder tab from IntelliJ, rather than "Text", it shows the following error:

java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel PluginClassLoader[org.jetbrains.plugins.javaFX, 191.7479.19] com.intellij.ide.plugins.cl.PluginClassLoader@52568f8a

java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel

error

The similar question Intellij's javaFX scene builder not working links to How do I configure IntelliJ IDEA with JavaFX and scenebulider?, but this is set-up correctly with Oracle's JDK12 for me.

The only thing I noticed that might help is that in my Project Structure > Platform Settings > SDKs there is no class path for javafx:

SDKs

How can I get the integrated Scene Builder working?

Sambit
  • 7,625
  • 7
  • 34
  • 65
nox
  • 252
  • 5
  • 18
  • See this question [Use SceneBuilder with JavaFX 11 in IDEA](https://stackoverflow.com/questions/53509991/use-scenebuilder-with-javafx-11-in-idea). You need either JDK 8, or if you use JDK 11+, you need to set level 1.8. – José Pereda Jun 02 '19 at 15:19
  • @JoséPereda doesn't work for me, nothing changes if I set level to "8 - Lambdas, type annotations etc." which I assume is 1.8? I am not sure about switching this whole project to JDK 8. – nox Jun 02 '19 at 15:45
  • Have you added the VM options, adding the JavaFX modules to the module path? – José Pereda Jun 02 '19 at 15:48
  • Since I am not really used to all this Java stuff, I am not sure about it. This project uses gradle, I don't have JavaFX installed manually. What can I do to check/set the modules to the module path? – nox Jun 02 '19 at 16:33
  • Are you using the JavaFX gradle plugin, like in this documentation: https://openjfx.io/openjfx-docs/#IDE-Intellij (Gradle sections)? If that is the case, the JavaFX modules you add to `javafx { modules = [...] }` and their transitive ones, will be added to the module path. – José Pereda Jun 02 '19 at 16:37
  • I am using the JavaFX gradle plugin and I have `javafx { modules = [ 'javafx.controls', 'javafx.fxml' ] }` in my build.gradle. `version` is missing though, but this doesn't seem to make a difference. – nox Jun 02 '19 at 16:54
  • As explained in the referred question, you need to set level 1.8, and then compile the project, so all the jars of the class path / module path are available for the embedded Scene Builder. – José Pereda Jun 02 '19 at 16:56
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/194339/discussion-between-nox-and-jose-pereda). – nox Jun 02 '19 at 17:00

1 Answers1

0

This known bug has been fixed in latest IntelliJ EAP version (EAP 2019.3, released yesterday - October 3, 2019)

Juanan
  • 1,385
  • 11
  • 26