Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nashorn and Java versions #253

Open
ahenket opened this issue Mar 7, 2024 · 0 comments
Open

Nashorn and Java versions #253

ahenket opened this issue Mar 7, 2024 · 0 comments

Comments

@ahenket
Copy link
Contributor

ahenket commented Mar 7, 2024

When your jdk is >= 15, you will get an error for Nashorn when you run a build script:

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

BUILD FAILED
.../Nictiz-testscripts/src/build-multiple.xml:11: The following error occurred while executing this line:
.../Nictiz-testscripts/src/bootstrap-from-github.xml:64: The following error occurred while executing this line:
.../Nictiz-testscripts/lib/Nictiz-tooling-testscripts/generate/2.7.0/ant/build-multiple.xml:11: The following error occurred while executing this line:
.../Nictiz-testscripts/lib/Nictiz-tooling-testscripts/generate/2.7.0/ant/build.xml:85: Unable to create javax script engine for javascript

However ... when you actually have GraalVM, this does not go away:

% java -version
java version "21.0.2" 2024-01-16 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing)

On macOS for ARM there's version 8, and then version 17 and up. There's no version 9-16 anymore (they were never compiled). On version 1.8 I get:

BUILD FAILED
.../Nictiz-testscripts/src/build-multiple.xml:11: The following error occurred while executing this line:
.../Nictiz-testscripts/src/bootstrap-from-github.xml:64: The following error occurred while executing this line:
.../Nictiz-testscripts/lib/Nictiz-tooling-testscripts/generate/2.7.0/ant/build.xml:123: java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

The way I currently solved this, is by adding https://repo1.maven.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar to my ant/lib folder.

It would be ever so nice be able to use idk >= 15 worry free

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant