Reputation: 870
I created a game and i wanted to create a jar. So i used Fat Jar Eclipse Plugin to create one http://fjep.sourceforge.net/
However, When i open it up, i just see a blank screen. To get my images im using commands like
new File(System.getProperty("user.dir") + "/Images/MainMenu/MainMenuButton_1.PNG"
So im am unsure why it is not working.
Edit: I figured out that it works if it is in the same directory as my project How to i get it so it doesnt have to be
Upvotes: 0
Views: 1534
Reputation: 75376
The behaviour described is consistent with the load thread exiting due to an uncaught FileNotFoundException, before having add anything to the pane shown.
I can strongly recommend printing out file.getAbsolutePath()
when you encounter FileNotFoundExceptions as that information is not present in the exception message. This will help you find out why the file name was broken.
Upvotes: 1