nus-cs2103-AY2223S2 / forum

12 stars 0 forks source link

Runtime error stating JavaFX API is version 19.0 #196

Closed vigonometry closed 1 year ago

vigonometry commented 1 year ago

System Details: Macbook Pro Processor: Apple M1 Pro (ARM) OS: Ventura 13.1

Despite only having one JavaVirtualMachine (i.e. the recommended ZuluJDK11), when my friend (Windows 11, AMD) ran my released jar file here for smoke tests, he receives an error stating that:

Loading FXML document with JavaFX API of version 19 by JavaFX runtime version of 11.

photo_2023-02-16_20-07-28

Would really appreciate some help regarding this matter

hingen commented 1 year ago

Likely not a warning you need to be worried about. It's caused by a mismatch in the JavaFX version specified by your fxml files (version 19) and the JavaFX version that is actually running the application (version 11). Not sure why it doesn't show up for ZuluJDK 11.

I think it's an warning that is save to ignore as long as you don't face any incompatibility issues caused by the version mismatch.

If you want to get rid of the warning, simply open each of your fxml files in a text editor and change the line:

<fx:root ... xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1">

to

<fx:root ... xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml">
vigonometry commented 1 year ago

Much appreciated, will attempt to use this.