FXMisc / RichTextFX

Rich-text area for JavaFX
BSD 2-Clause "Simplified" License
1.21k stars 236 forks source link

Execution failed for task ':richtextfx-demos:configJavafxRun'. #1171

Open 1030852813 opened 1 year ago

1030852813 commented 1 year ago

The error shows up when running demos. I am using M1 chip and the following links are not found:

Execution failed for task ':richtextfx-demos:configJavafxRun'.

Could not resolve all files for configuration ':richtextfx-demos:runtimeClasspath'. Could not find javafx-fxml-11-mac-aarch64.jar (org.openjfx:javafx-fxml:11). Searched in the following locations: https://repo.maven.apache.org/maven2/org/openjfx/javafx-fxml/11/javafx-fxml-11-mac-aarch64.jar Could not find javafx-controls-11-mac-aarch64.jar (org.openjfx:javafx-controls:11). Searched in the following locations: https://repo.maven.apache.org/maven2/org/openjfx/javafx-controls/11/javafx-controls-11-mac-aarch64.jar Could not find javafx-graphics-11-mac-aarch64.jar (org.openjfx:javafx-graphics:11). Searched in the following locations: https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/11/javafx-graphics-11-mac-aarch64.jar Could not find javafx-base-11-mac-aarch64.jar (org.openjfx:javafx-base:11). Searched in the following locations: https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/11/javafx-base-11-mac-aarch64.jar

Jugen commented 1 year ago

So none of those files exist on maven, however each file without "-aarch64" does exist. Anybody have any ideas on where the "-aarch64" comes from or how to get rid of it ?

Elmari commented 1 year ago

As far as I understand it, it is as follows: Mac M1 (and newer) are arm based processors. These need specially adapted JavaFX dependencies, i.e. there are now JavaFX dependencies for intel-based Macs as well as arm-based Macs. Support for M1 was first added with JavaFX 17. These dependencies have the classifier mac-aarch64. If you want to add them explicitly (though this should not be necessary), you could do that as follows (maven snippet):

<dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-graphics</artifactId>
    <version>17</version>
    <classifier>mac-aarch64</classifier>
</dependency>

So, in order to run the demos on an M1-based Mac, it should be enough to switch from JavaFX 11 to JavaFX 17.