Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

JavaFX – java.lang.nullpointer on one machine but not another

I have created a JavaFX Java program that displays few screens.
on one machine it works when I run from eclipse but fails when I run it as a jar.
on another machine it fails in eclipse with the same error I get previously.

I have linked a screenshot containing part of the code and also the error and folder layout.

any assistance is appreciated.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

screenshot containing part of the code and also the error and folder layout

>Solution :

It looks like the fxml file you are trying to use is called MainForm.fxml. But on line 14 your are trying to use Mainform.fxml. Try capitalizing the ‘F’ on form.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading