Technical justification: The FXMLLoader uses new URL(URL, String) in order to resolve a relative URL against the FXML file location. This means that the second string parameter must be encoded as an URI path.
What it means for the FXML author:
When writing paths into the source attribute of an fx:include element, or when using the @ syntax, the path should be encoded as for an URI:
http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#encode
For instance, if the file name contains whitespace - as in "My File" then the FXML should contain:
<Image url="@My%20File"/>
or
<fx:include source="My%20File"/>
rather than
<Image url="My File"/>
or
<fx:include source="My File"/>
- relates to
-
JDK-8122110 Problems with whitespace in included file names: All file paths should be URI-encoded in FXML
-
- Closed
-