Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
Graalvm and Netbeans 12.5 to replace Nashorn functionality under Ant

I have some legacy java & fx code that built perfectly in older versions of Java and Netbeans (using ANT).

I recently revisited this to upgrade the ide and jdk/jre for java and fx. Of course, it fails to build because Nashorn was pulled out. Ok - I got that.

I have to admit, I am freaking stumped at how I can just get graalvm set to take over in nashorn compatibility mode to process the build javascript.

Some will say dump ant and go with maven, etc., but for right now, I just want to build this without restructuring anything.

So, is there anyone out there who knows exactly where in Netbeans (12.5) I have to make changes and which changes I have to make so that javascript will work again like it did under Nashorn and ANT?

I've read all the docs and frankly, my head is spinning. Graalvm does many more things than I need right now.

Can anyone help?

Thanks!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

While Nashorn was removed from JDK 15, it lives on as a standalone OpenJDK project (similar to e.g. JavaFX).

You could drop-in standalone Nashorn JAR file as a dependency to your Ant build and carry on. That'd be the minimal change you'd need.

Putting it in your Ant lib directory should work. By default that's $ANT_HOME/lib but some Ant installations use a different location, e.g. homebrew-installed Ant will use /usr/local/share/ant. If you don't want to put it in the lib, you can also put it with your project and use <classpath> or <classpathref> within the <script> tag to point to it.

You can downloaded the JAR from Maven Central; be sure to check the POM file for the the dependencies you'll also have to get (few ASM JARs.) If you're using some dependency manager (Gradle, Maven, what have you) then it will pull them automatically.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!