Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
javafx fxml: page language not specified - JavaScript seems not to be supported

The FXMLLoader does not recognize the <?language javascript?> directive when trying to process an fxml script (see below). The error message is "Page language not specified". My fxml is like follows (actual code ommitted for brevity):

<?language javascript?>

<!-- differnet includes -->
...

<!-- actual fxml -->
<StackPane xmlns="http://javafx.com/javafx"
           xmlns:fx="http://javafx.com/fxml"
           fx:controller="com.xxx.xxx.MainViewController"
           prefWidth="1200">

...

    <!-- somewhere in the middle of the fxml code -->
    <fx:script>
        function clearTool1() {
            tool1.setValue(null);
        }
    </fx:script>

...

<StackPane/>

I have investigated a bit and found out that the ScriptEngineManager class of javafx actually does not see any script engines. In particular, in its getEngineByName method, the collection of ScriptEngineFactory is empty, so it does not find any javascript engine and throws the exception later on. I will not go into details on this since the goal is not to debug javafx source code but I thought it could be useful as a hint.

Do you have any idea why the scripting language directive is not recognized although the fxml and everything else is written correctly?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Of course, you have to include the scripting engine implementation into your pom...

<dependency>
    <groupId>org.openjdk.nashorn</groudId>
    <artifactId>nashorn-core</artifactId>
    <version>15.0</version>
</dependency>

Thanks to @Pointy and @James_D for giving a hint regarding that.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda