Image class and paths relative to classpath
lehmann at media-interactive.de
Mon Apr 23 09:50:42 PDT 2012
you are right. I tried this a few months ago and it did not work. Maybe
I forgot the '@' symbol - although it is used for relative paths as well
and should have been present anyway. Thanks...
On 23.04.2012 18:40, Greg Brown wrote:
>> 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