Image class and paths relative to classpath
greg.x.brown at oracle.com
Mon Apr 23 09:40:22 PDT 2012
> Correct me if I am wrong but today FXML seems to support relative paths only. For instance, if I have a shared image resource "warning.png" in the root of the classpath, I have to specify it like "../../../../warning.png" in the FXML, depending on which package the FXML is in.
Currently, you can specify either a relative path (e.g. "../../warning.png") or an absolute path (relative to the classpath; e.g. "/warning.png") in FXML. This works for includes, script files, and attributes with a leading "@" symbol.
More information about the openjfx-dev