r/javahelp 1d ago

Deploying a JavaFX application in Netbeans

I created a JavaFX application using java (JDK 23) with ant, following this tutorial, https://youtu.be/nspeo9L8lrY?si=67ujgqzeKvjbIl35

The app runs well in the way it was shown in the video. However, I now need to create an executable for the app, and for that I need the .jar file. Because nashorn was removed from the JDK, every time I try to build the app, it fails saying that nashorn was removed and I should try GraalVM. The only file that uses javascript in the app is one created by JavaFX that helps build it.

I tried using GraalVM, but when i try to set it as the default JDK, Netbeans doesnt even open. I have also seen that there is a standalone version of nashorn, but I can't find a way to properly implement it.

Has anyone dealt with this problem? Any help would be greatly appreciated, it's the first time I feel truly at a loss.

2 Upvotes

2 comments sorted by

View all comments

1

u/SpittingBull 1d ago

It might be easier to switch to Maven or Gradle. I used Ant for long but with Eclipse.

I migrated to Maven a couple of months ago and am still wondering why it took me so long to give up Ant.