Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

211
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda