How do I fix the error code for JavaFX in NetBeans

When I’m going to run my code I’m getting the following error codes:

Java 15 has removed Nashorn, you must provide an engine for running JavaScript yourself. 
GraalVM JavaScript currently is the preferred option.
BUILD FAILED
C:UsersnatasOneDriveDocumentsNetBeansProjectsKilometerMilesConverternbprojectjfx-impl.xml:1251: The following error occurred while executing this line:
C:UsersnatasOneDriveDocumentsNetBeansProjectsKilometerMilesConverternbprojectjfx-impl.xml:1259: Unable to create javax script engine for javascript

I currently have Apache NetBeans IDE 21 with libraries JavaFX22, JavaSDK (among others) already installed.

I imported the GraalVM Javascript as a Library but am I meant to upload this elsewhere? Thanks for any help, I’m a new Java programming student, so I greatly appreciate it!

This is the full output when running my project:

-mark-project-state-running:

-pre-init:

-init-private:

-init-user:

-init-project:

-check-clean-if-config-changed:

-clean-if-config-changed:

-init-macrodef-property:

-init-modules-supported:

-do-init:

-check-property-javafx.sdk:

-check-platform-home-fxsdk-java:

-set-platform-home-fxsdk-java:

-check-platform-home-java:

-set-platform-home-java:

-check-platform-home-probjdk-java:

-set-platform-home-probjdk-java:

-check-platform-home-envjdk-java:

-set-platform-home-envjdk-java:

-check-property-javafx.runtime:

-check-platform-home-fxrt-java:

-set-platform-home-fxrt-java:

-check-platform-home-jre-java:

-set-platform-home-jre-java:

-check-platform-home:

-check-jdk-version:

-check-jfxrt-in-fxrt:

-set-jfxrt-in-fxrt-old:

-set-jfxrt-in-fxrt-new:

-set-jfxrt-in-fxrt-mods:

-check-jfxrt-in-fxsdk-jre:

-set-jfxrt-in-fxsdk-jre-old:

-set-jfxrt-in-fxsdk-jre-new:

-check-jfxrt-in-fxsdk-rt:

-set-jfxrt-in-fxsdk-rt-old:

-set-jfxrt-in-fxsdk-rt-new:

-check-jfxrt-in-platform-home-jre:

-set-jfxrt-in-platform-home-jre-old:

-set-jfxrt-in-platform-home-jre-new:

-check-jfxrt-in-platform-home-rt:

-set-jfxrt-in-platform-home-rt-old:

-set-jfxrt-in-platform-home-rt-new:

-check-jfxrt-modules-in-platform-home:

-set-jfxrt-modules-in-platform-home:

-check-jfxrt-in-jre:

-set-jfxrt-in-jre-old:

-set-jfxrt-in-jre-new:

-set-jfxrt-in-jre-mods:

-check-jfxrt-in-envjdk-jre:

-set-jfxrt-in-envjdk-jre-old:

-set-jfxrt-in-envjdk-jre-new:

-check-jfxrt-modules-in-envjdk:

-set-jfxrt-modules-in-envjdk:

-pre-check-jfx-runtime:

-check-jfx-runtime:

-check-project:

-warn-of-preloader:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-modulename:

-init-source-module-properties:

-init-macrodef-javac-with-module:

-init-macrodef-javac-with-processors:

-init-macrodef-javac-without-processors:

-init-macrodef-javac:

-init-macrodef-test-impl:

-init-macrodef-junit-init:

-init-test-properties:

-init-macrodef-junit-prototype-with-module:

-init-macrodef-junit-prototype-without-module:

-init-macrodef-junit-single:

-init-macrodef-junit-batch:

-init-macrodef-junit:

-init-macrodef-junit-impl:

-init-macrodef-testng:

-init-macrodef-testng-impl:

-init-macrodef-test:

-init-macrodef-junit-debug-impl:

-init-macrodef-test-debug-junit:

-init-macrodef-testng-debug:

-init-macrodef-testng-debug-impl:

-init-macrodef-test-debug-testng:

-init-macrodef-test-debug:

-init-debug-args:

-init-macrodef-nbjpda:

-init-macrodef-debug:

-init-macrodef-java-with-module:

-init-macrodef-java-with-unnamed-module:

-init-macrodef-java-without-module:

-init-macrodef-java:

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:
   [delete] Deleting: C:UsersnatasOneDriveDocumentsNetBeansProjectsKilometerMilesConverterbuildbuilt-jar.properties

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: C:UsersnatasOneDriveDocumentsNetBeansProjectsKilometerMilesConverterbuildbuilt-jar.properties

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:

-post-compile:

compile:

-pre-jar:

-check-module-main-class:

-set-module-main-class:

-pre-pre-jar:

-do-jar-create-manifest:

-do-jar-copy-manifest:

-do-jar-set-mainclass:

-do-jar-set-profile:

-do-jar-set-splashscreen:

-check-do-mkdist:

-do-jar-jar:

-init-macrodef-copylibs:

-do-jar-copylibs:

-do-jar-delete-manifest:

-do-jar-without-libraries:

-do-jar-with-libraries:

-jfx-copylibs-warning:

-jfx-copylibs:
Java 15 has removed Nashorn, you must provide an engine for running JavaScript yourself. GraalVM JavaScript currently is the preferred option.

BUILD FAILED
C:UsersnatasOneDriveDocumentsNetBeansProjectsKilometerMilesConverternbprojectjfx-impl.xml:1251: The following error occurred while executing this line:
C:UsersnatasOneDriveDocumentsNetBeansProjectsKilometerMilesConverternbprojectjfx-impl.xml:1259: Unable to create javax script engine for javascript

Total time: 0 seconds
Result: 1
BUILD SUCCESSFUL (total time: 1 second)