1

Im trying to do a project using Javafx and Netbeans IDE and I can not run my project because this message below "Unable to create javax script engine for javascript". Please can someone tell me how can I fix this please.. Below you can see what the link can open in my IDE . Please help

enter image description here

  • What JDK version are you using? The normal (Nashorn) JavaScript script engine was removed in JDK15. – Pointy Jan 07 '23 at 18:00
  • I'm using jdk19 @Pointy – James James Jan 07 '23 at 18:03
  • OK, well there's no built-in JavaScript script engine in that version. – Pointy Jan 07 '23 at 18:04
  • what should i do in your opinion? I have to finish this project tomorrow. @Pointy – James James Jan 07 '23 at 18:07
  • I'm not sure, I've googled around to see and it looks like people have come up with ways of using different JavaScript implementations. I have never personally attempted that, but I have used the old JavaScript mechanism (which, for most simple things, worked fine) and I knew that it was going away. – Pointy Jan 07 '23 at 18:10
  • 3
    Are you following the instructions at https://openjfx.io/openjfx-docs/ for getting started with JavaFX and Netbeans? Do you specifically need a Javascript engine, or is this error just coming from your attempt to use JavaFX? – James_D Jan 07 '23 at 18:54
  • 3
    @James_D: I suspect that an incorrect project type was selected, as outlined [here](https://stackoverflow.com/a/73611827/230513). – trashgod Jan 07 '23 at 18:57
  • 2
    JavaFX 8 and JavaFX 11 are obsolete, don’t use those versions. Use a modern version, like JavaFX 19. Use Maven or Gradle instead of ant. Ant JavaFX tasks are obsolete and not available in modern JavaFX versions. That ant script you have in your screenshot is assuming obsolete JavaFX 8 and JDK 8 versions. – jewelsea Jan 07 '23 at 21:26

0 Answers0