Creating Jar with a ressources directory

Answered

I wanna create a jar and i have a folder of my icons for the game..and when i create the jar and i run it the icons don't appear.

The structure of my project is : 

Game4.0 :

-> Icons

-> src

and in my classes i have declarations like this  final File file = new File("Icons/victory.jpg");

 

0
1 comment

The resources in jar files need to be accesses via input stream. Referencing them as file will not work, see https://stackoverflow.com/a/20389418/2000323

0

Please sign in to leave a comment.