I've came across this problem while trying to generate .exe file by using Netbeans 13. (Package as -> exe installer)
Full error:
C:\Users\*\Documents\NetBeansProjects\*\nbproject\build-native.xml:428: The following error occurred while executing this line:
C:\Users\*\Documents\NetBeansProjects\*\nbproject\build-native.xml:436: Unable to create javax script engine for javascript
BUILD FAILED (total time: 4 seconds)
Does anyone know what seems to be problem here and how to fix it?
UPDATE:
OS: Windows 10
JavaFX: javafx-sdk-17.0.2
JDK: jdk-17.0.2
What am I expecting?
- I am expecting .exe file
There's no need really for posting code because building project and running project itself goes smoothly (without the errors). The problem occurs after trying to generate .exe installer file by using Package As -> EXE Installer (as shown in image):
You can go back to see Full error and when I open build-native.xml file it points me to these lines of code:
<target name="-jfx-copylibs" depends="init,compile,-pre-pre-jar,-pre-jar,-jfx-copylibs-warning" unless="fallback.no.javascript">
<jfx-copylibs-js-impl/>
</target>
<target name="-jfx-copylibs-warning" if="fallback.no.javascript">
<echo message="Warning: Dependent Libraries copy (-jfx-copylibs) skipped in fallback build mode due to JDK missing JavaScript support."/>
</target>
<macrodef name="jfx-copylibs-js-impl">
<sequential>
<local name="run.classpath.without.build.classes.and.dist.dir"/>
<pathconvert property="run.classpath.without.build.classes.and.dist.dir">
<path path="${run.classpath}"/>
<map from="${basedir}${file.separator}${build.classes.dir}" to=""/>
<map from="${basedir}${file.separator}${dist.jar}" to=""/>
<scriptmapper language="javascript">
Where line 428 is:
<target name="-jfx-copylibs" depends="init,compile,-pre-pre-jar,-pre-jar,-jfx-copylibs-warning" unless="fallback.no.javascript">
<jfx-copylibs-js-impl/>
And where line 436 is:
<pathconvert property="run.classpath.without.build.classes.and.dist.dir">