0

I am using IntelliJ (2020.1). I have installed javaFX v-11.0.2 and it is working fine. I am also using Scene Builder v-8. As soon as I include any jfx_object in scenebuilder(like jfx_RadioButton etc.) and then run the main.java in intellij it shows an error java.lang.reflect.InvocationTargetException and bunch of other errors too. I have included JFoenix as external library too. This error only shows up when any jfx object is added in scene builder.

Please help me to fix, I have given my 2 days on this and i am really frustrated.

  • Scene Builder 8 is for JavaFX 8. Try updating to Scene Builder 11 (and use the JFoenix version for JavaFX 9+). – Slaw Jun 23 '20 at 12:29
  • where can I get javaFX 8 because the site https://gluonhq.com/products/javafx/ has only version 11 and 11+? Also SceneBuilder 11 has a windows Installer package file and not .exe. So i cannot set the path for executable in Intellij, that's why I am using SB ver - 8. – Eshu Manohare Jun 23 '20 at 14:13
  • You can install Scene Builder and then point to the installed `exe`. I'm not sure where you can get a standalone JavaFX 8, but Oracle's distribution of Java 8 includes JavaFX 8. Other distributions may do the same (including for later versions, unlike Oracle). – Slaw Jun 23 '20 at 14:39
  • I changed to JDK 8 with sceneBuilder 8 + javafx 11 + jfoenix 8. Still I am getting the same error. Please tell what should I do? Shoot my laptop? – Eshu Manohare Jun 23 '20 at 14:57
  • No. If you have JDK 8 (from Oracle) then JavaFX 8 is included—don't pull in JavaFX 11. And if that still doesn't help then please [edit] your question to add the exact error message you're getting (and possibly a [mre] demonstrating the problem). – Slaw Jun 23 '20 at 14:59
  • Okay, but in JDK 8 do I need to include javafx 8 as an external dependency? If yes where do I locate it in JDK? Any naming convention of file? – Eshu Manohare Jun 23 '20 at 15:14
  • "_If you have JDK 8 (from Oracle) then JavaFX 8 is included_" – just like any other class in Java SE – Slaw Jun 23 '20 at 15:34
  • Thankyou so much for your help. The problem is fixed now and using JDK 13. I modified the module-info.java and added requires com.jfoenix. Can you give upvote on the comment please? – Eshu Manohare Jun 23 '20 at 17:06

1 Answers1

1

It is fixed now. Thanks for the help Slaw. I just have to change the module-info.java file. '''

module IdeaProjects {
    requires javafx.fxml;
    requires javafx.controls;
    requires com.jfoenix;
    opens sample;
}