Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error while creating JavaFX11 application in Apache Netbeans 10

i am new to java fx and i have downloaded Apache Netbeans 9 which runs on java 11.

since java fx is shipped separately, i have downloaded openjfx-11.0.1_SDK and followed steps in this link https://openjfx.io/openjfx-docs/#install-javafx

when i try to create java fx application in apache netbeans , i am getting below error

Failed to automatically set-up a JavaFX Platform. Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab, enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime. Note: JavaFX SDK can be downloaded from JavaFX website

attaching screen shot of netbeans 10.

enter image description here

like image 427
pappu_kutty Avatar asked Jan 04 '19 07:01

pappu_kutty


People also ask

How do I get JavaFX to work in NetBeans?

Right-click the Libraries folder in your project, select the Add Library... command, then choose JavaFX 13 from the list of global libraries. If you don't have that library, then you need to go back to the previous section. Finally, add a new JavaFX Main Class... to the project's package.

Why is JavaFX no longer supported?

JavaFX was removed from JDK since JDK 11. Since JDK 9, java is modular. JavaFX was split into modules. Hence there is no longer a single jfxrt.

Does Apache NetBeans support JDK 8?

You can edit it in GitHub following these contribution guidelines. NetBeans IDE supports JDK 8 features, such as lambda expressions, repeatable annotations, compact profiles, etc.


2 Answers

This is for the future developers that will stumble on this problem. You can follow this video for Installing JavaFX13 and integrate it with Apache Netbeans 11.2. Try following the instructions here

There might be problems with CSS autocomplete but you can create a JavaFx project now.

Edited: As suggested from the other answer, you can download the JavaFX from the official page of JavaFX.

like image 126
silent_coder14 Avatar answered Sep 21 '22 12:09

silent_coder14


Setting up the correct Environment For creating JavaFX11 application in Apache Netbeans 10 is Quite A Hustle .... This Link Might Help You in some extent

But even after completing these steps you will find even more Errors while running the project... Here is the Possible solution for that scenario

like image 34
Wahid Molla Avatar answered Sep 21 '22 12:09

Wahid Molla