0

I’m currently using java jdk 18.0.2 attempting to make a javafx program, but it says it is not available. I’ve downloaded the libraries and added them manually to my project but that does not work also. Finally I downloaded a jdk off of azul that incorporates javafx in it but this also does not work. Everytine the program runs and compiles it says that it can’t find the javafx for JavaScript even though I’m using java

I’ve tried downloading multiple different jdks and sdks to throw in as separate libraries to use for import but it still is not working. Is it a problem with Apache 14?

My professor requires us to use java with ant so using maven is not an option.

  • The jdk that incorporates javafx is the azul Zulu 19.30.11 version and it has a class path error I’m not sure how to fix at all – Throwaway Dec 05 '22 at 06:13
  • I don’t know what your issue is, but see ["Unable to create javax script engine for javascript" error when trying to create EXE file](https://stackoverflow.com/questions/71928637/unable-to-create-javax-script-engine-for-javascript-error-when-trying-to-creat/71932205#71932205) in case some of the info is relevant to you (it may not be). In general, follow the getting started instructions at [openjfx.io](https://openjfx.io/). – jewelsea Dec 05 '22 at 07:02
  • See also this [answer](https://stackoverflow.com/a/73611827/230513) which illustrates NetBeans 14 with OpenJFX. – trashgod Dec 05 '22 at 17:42
  • [1] Not necessarily relevant to your issue, but JDK 18 was released nearly 3 months after NetBeans 14, and [NetBeans 14 does not formally support its use](https://netbeans.apache.org/download/nb14/). It's worth switching to JDK 17 because it is formally supported, and that would eliminate your JDK version as a potential source of your problem (and potentially others as well). Unless you truly need new features in JDK 18 you have nothing to lose. [2] Have you tried the approach described in the comment from @trashgod for creating your Ant project? – skomisa Dec 06 '22 at 06:17
  • @Throwaway Re your class path error with Azul Zulu 19.30.11, is it possible that you had problems because you have multiple versions of Java installed? If so, it might be worth trying again after uninstalling/deleting older JDK versions. Of course NetBeans 14 doesn't formally support JDK 19, but if you can get it working you will also gain the advantage of the associated bug fixes in JavaFX 19. Seems worth trying. Also, unless you are required to use NetBeans 14, consider using NetBeans 15 instead. – skomisa Dec 06 '22 at 06:28
  • The missing javascript engine, removed in Java 15, is likely an artifact of having inadvertently chosen to create a JavaFX project instead of a Java Application, as shown [here](https://stackoverflow.com/a/73611827/230513); the easiest fix is to create a new project with your existing sources. – trashgod Dec 06 '22 at 12:35

0 Answers0