问题
OS: Ubuntu 14.04.
IDE: (Eclipse Mars.1 Release (4.5.1)) and Scene builder 2.
I can't choose root element because as I understand it should be done.
This window I see when creating a file.
Maybe I incorrectly set the path to my Scene Builder executable.
How to solving this problem?
I did everything according to instructions.
Update 1: Not yet solved the problem, I'll use the Idea IDE
Update 2: Now i use Netbeans with JDK from ORACLE website. I chose the easiest way.
回答1:
The problem is solved for me by installing the latest jdk 8u73 and by adding the new build path in eclipse
Ps : sorry for my english
Mounir (France)
回答2:
I stumbled on this problem because I was under the impression that JavaFX was bundled with Java 8, but that's not true (or maybe not always true) for OpenJDK. Installing the openjfx package solved the problem for me.
回答3:
I solved this problem by referencing the JavaFX library to the project. One way to do that is to right-click the project folder in Eclipse, then select Build Path -> Add External Archive.
The JavaFX archive, named jfxrt.jar
is located in the directory jre\lib\ext
of your JDK directory.
Surprisingly, the JavaFX libraries are not automatically linked in a JavaFX project... This operation also allows to build JavaFX sample projects, which otherwise don't compile.
回答4:
I had exactly same problem when using e(fx)clipse 3.0. In my situation, changing to version 2.4 helped to fix solution with creating new JavaFX projects (it generates .java, .fxml and .css files automatically now) and with adding files to existing projects. Just uninstall 3.0 and try 2.4
来源:https://stackoverflow.com/questions/35065468/cannot-create-fxml-file-in-javafx-project-in-eclipse