Kotlin nullpointer in loading FXML but only in a packaged jar?


So I have a weird situation, I’m loading an FXML from my resources directory, it all works in IDE, but when I run the packaged jar. (Created with clean compile assembly:single )

It will give the following error upon loading the FXML:

Relevant Code:

File Structure:

What’s going on here?


It is not a kotlin problem. You get not a KNPE, but regular NPE somewhere inside javafx framework. Your stack trace does not allow to debug it, because it is UI trace. Actual error is usually lower.

Please do not post screenshots when it is possible to post text. It is very hard to read.