I am using NetBeans 12.0. and windows 10 64 bit.My JDK is 15.0.2 and JavaFx SDK 16. When I try to build my javafx application it shows the following build error:
C:\Users\musta\OneDrive\Documents\NetBeansProjects\JavafxTry\nbproject\jfx-impl.xml:1251: The following error occurred while executing this line: C:\Users\musta\OneDrive\Documents\NetBeansProjects\JavafxTry\nbproject\jfx-impl.xml:1259: Unable to create javax script engine for javascript
BUILD FAILED (total time: 3 seconds)
I am using NetBeans 12.0. and windows 10 64 bit.My JDK is 15.0.2 and JavaFx SDK 16. When I try to build my javafx application it shows the following build error:
C:\Users\musta\OneDrive\Documents\NetBeansProjects\JavafxTry\nbproject\jfx-impl.xml:1251: The following error occurred while executing this line: C:\Users\musta\OneDrive\Documents\NetBeansProjects\JavafxTry\nbproject\jfx-impl.xml:1259: Unable to create javax script engine for javascript
BUILD FAILED (total time: 3 seconds)
Share Improve this question asked Apr 6, 2021 at 6:07 Mustafa IramMustafa Iram 411 gold badge1 silver badge2 bronze badges2 Answers
Reset to default 2The Nashorn JavaScript Engine has been removed in Java 15: https://openjdk.java/jeps/372
The javascript engine used to be included in the JVM but it has been removed in Java 15.
As an alternative you can use Groovy instead. Groovy looks similar to javascript. Your javascript should be easy to port to Groovy.
When you use the 'groovy-all jar', the script tag looks something like:
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="path/to/groovy-all-2.4.21.jar" />
<groovy>
// your Groovy script
</groovy>