0

I'm trying to export my project as an executable file using iscc but it throws the error,

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

and then says build failed:

{PATH OF PROJECT}\nbproject\jfx-impl.xml:3597: The following error occurred while executing this line:
{PATH OF PROJECT}\nbproject\jfx-impl.xml:1251: The following error occurred while executing this line:
{PATH OF PROJECT}\nbproject\jfx-impl.xml:1259: Unable to create javax script engine for javascript

How do i use GraaIVM to export this as an executable? I'm using netbeans 13

Anime Zone
  • 165
  • 1
  • 8
  • Perhaps this is a duplicate of: ["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) – jewelsea May 04 '22 at 19:56
  • @jewelsea I don’t think that answered my question. It states I can use GraaIVM but I have no idea how to get that to work. I tried searching for it but nothing useful comes up – Anime Zone May 04 '22 at 23:30
  • What are you doing? Are you using the obsolete and non-functional “Package as EXE installer” option which is shown in the linked question? If so, it is never going to work, as noted in the linked answer for the many reasons given there, regardless of text about using “GraalVM JavaScript”. Even if you could use that in this process, the process is completely broken and not fixable. The reason nothing useful comes up when you search is because it is not a valid approach. You need to use a packaging option specified in the [javafx tag info](https://stackoverflow.com/tags/javafx/info). – jewelsea May 05 '22 at 03:28
  • @jewelsea No like it stated in the original post I'm using iscc for the executable extension. Unless iscc, which I downloaded separately from Netbeans, is apart of Netbeans then no I'm not using the, "obsolete and non-functional “Package as EXE installer” option which is shown in the linked question" – Anime Zone May 05 '22 at 07:34
  • Please provide enough information in the question that your issue can be replicated. What is iscc? Where do you download it from and how do you use it? Your tag is netbeans-13, how is that related if you are using some other software? Can you provide a [mcve]? Please link to documentation you followed. What are the JDK and JavaFX versions you are using? – jewelsea May 05 '22 at 16:47
  • @jewelsea it doesn’t matter what iscc is and it’s not a different software I’m using netbeans 13. All I want to know is how do I set GraaIVM as the engine. Because regardless if I try to build my project it throws an error about needing an engine, since Java 15 got rid of theirs. I’m using Java fx jdk17 Azul zulu jdk17 more specifically. If you have another engine that would be great. I just need an engine to use so I can deploy my program – Anime Zone May 05 '22 at 23:54
  • [Documentation on GraalVM JavaScript reference](https://www.graalvm.org/22.0/reference-manual/js/) and [Java interoperability guide](https://www.graalvm.org/22.0/reference-manual/js/JavaInteroperability/). – jewelsea May 06 '22 at 03:45
  • [Migration from Nashorn to GraalVM JavaScript](https://golb.hplar.ch/2020/04/java-javascript-engine.html). – jewelsea May 06 '22 at 04:04
  • Or you can use jdk 14, which includes the Nashorn JavaScript engine, or add the [standalone Nashorn](https://github.com/openjdk/nashorn) to later jdk releases. – jewelsea May 06 '22 at 17:54

0 Answers0