My JavaFX application is modular and functions perfectly in loading all stylesheets when running through IntelliJ IDE.
However, upon publishing the application as a PKG file for Mac platform and attempting to run it, no CSS styling is applied. While the PKG file successfully installs the JavaFX application on Mac, the stylesheet fails to load.
The application runs as expected but lacks any CSS styling.
I am utilizing openJDK-15.0.2 and creating the PKG file using jpackage. Folder Structure:
In order to access the resources:
Class clazz = SocketClientFX.class;
Scene scene = new Scene(root);
scene.getStylesheets().add(clazz.getResource("/styles/Styles.css").toString());