0

I'm facing an issue with Netbeans IDE 16 where I cannot select JavaFX platforms, as the dropdown selection is empty. Additionally, an error message appears saying "Failed to automatically setup JavaFX Platform". I have already installed JDK and Netbeans with JavaFX, but the issue persists.

1

Expected Result: The dropdown menu for selecting JavaFX platforms should show the installed platforms.

Actual Result: The dropdown menu for selecting JavaFX platforms is empty, and an error message appears.

Additional Information:

I have installed JDK and Netbeans with JavaFX. I have tried re-installing JDK and Netbeans, but the issue persists. I have also checked that the JavaFX library is added to the project. How can I solve this issue and select JavaFX platforms in Netbeans IDE 16?

Thank you for your help.

vimuth
  • 5,064
  • 33
  • 79
  • 116
  • It should be the same as the Netbeans 14 duplicate above. – SedJ601 Feb 19 '23 at 02:57
  • 2
    If the duplicate does not work, go to https://openjfx.io/openjfx-docs/. – SedJ601 Feb 19 '23 at 02:59
  • @SedJ601 While the question here is certainly similar to the proposed duplicate (the same issue, but with different versions of Java and NetBeans), no answer had been accepted, and with good reason: the question was about using JavaFX in an Ant project, and neither answer provided a suitable solution to that specific problem. Instead they both provided unsatisfactory workarounds. – skomisa Feb 19 '23 at 10:36
  • Use maven instead – Giovanni Contreras Feb 19 '23 at 13:28
  • Check this https://stackoverflow.com/a/74924150/7587451 – Giovanni Contreras Feb 19 '23 at 13:30
  • As suggested [here](https://stackoverflow.com/a/73611827/230513) in the duplicate, "Don't try to create a JavaFX project. Instead, choose Java with Ant and Java Application to create a new project." – trashgod Feb 19 '23 at 14:21
  • @skomisa: I must demur; this [answer](https://stackoverflow.com/a/73611827/230513) in the proposed duplicate shows how to create an [tag:ant] project for a modern JavaFX implementation, and I've cited a second example. I'd welcome your input on improving that answer. – trashgod Feb 19 '23 at 14:32
  • @skomisa, `JavaFX` via `Ant` is, in a sense, depreciated. The experts are now recommending people move away from `Ant` and to other building tools like `Maven` and `Gradle`. I don't believe the OP cared if `Ant` was used. I think they were following an old tutorial that used `Ant`, and they were under the idea that `Ant` was what was needed. Also, the solution is find as long as all of the steps are the same for the different versions. – SedJ601 Feb 19 '23 at 22:38
  • @SedJ601 You can't dismissively claim _"I don't believe the OP cared if Ant was used"_. because the user is _explicitly asking_ how to be able to select from the _Java FX Platform_ field within the Project Wizard. Not only that, but the NetBeans error message in the screen shot is telling the user exactly what to do in red font, and it doesn't involve Maven. But rather than seek clarification from the OP, you chose to close vote this question as a duplicate of another which has no accepted answer, and none of the answers address the question being asked; they just give workarounds. – skomisa Feb 20 '23 at 08:39
  • @SedJ601 If you want to help new users, constructively ask them for clarification, but simply closing this question as a duplicate is not helpful at all. – skomisa Feb 20 '23 at 08:43
  • @trashgod Neither answer on the linked duplicate addressed the question that was asked, and the problems the user encountered. Instead, both answers just advocated alternative approaches, and neither actually showed the successful creation of a JavaFX application with those alternative approaches. – skomisa Feb 20 '23 at 08:53
  • @skomisa: Thank you for commenting; your colloquy with SedJ is illuminating. I have successfully created [tag:ant]/[tag:javafx] projects with NetBeans 16 using the tutorial cited; I had encountered the same problem as both questions due to an incorrect choice in step 1. The effect seen depends on whether the old libraries have been copied, installed or inherited as a legacy. I see [tag:ant]/[tag:javafx] projects as a convenient choice while evaluating more recent alternatives. I urge the OP to try again, focusing on the critical step in clearing that first hurdle. – trashgod Feb 20 '23 at 13:55
  • 1
    @Christopher Pone, do you want to know how to use `Netbeans` with `JavaFX` via `Ant`, or do you want to use `Netbeans` with `JavaFX` via the currently recommend building tools? – SedJ601 Feb 20 '23 at 15:48
  • oh my bad, didnt clarified from the start, still new to programming. @SedJ601 i want to use netbeans with javafx yes. – Christopher Pond Feb 21 '23 at 09:58
  • im glad for all of your responses guys. thanks! learned some things today. – Christopher Pond Feb 21 '23 at 10:01

0 Answers0