I have this code:
val url: URL = getClass.getResource(\"com/mysite/main/test.fxml\")
and it always returns null (or Unit
null
Unit
If it does not work, you can try with ClassLoader:
ClassLoader.getSystemResource("filename").getPath
The filename should be in the same directory layer