When I export my game as runnable .jar file with custom window's icon - it doesn't run. It runs only in debug mode and when I try to launch .jar with the console it says that it cannot load icon file.

Picture of my problem: originally posted as http://oi43.tinypic.com/2gy0p75.jpg

  • \$\begingroup\$ We don't have enough information to help. What IDE are you using? What does your project structure look like? Also maybe include the code where it loads the icon. \$\endgroup\$
    – Vincenzo
    Jun 3, 2013 at 2:31

1 Answer 1


You probably did not include the icon in your jar file, or you did include it, but not in the right location. From the console, run

jar tf Trace.jar

to get a list of all files that are actually included in your .jar file. Check if there is an entry for the given path, namely


If it is absent you'll have to configure your IDE to include it properly. If the image file is there, but not under the above path, you'll either have to configure your IDE to put it in the correct place inside the jar, or adapt your code to look for the file in a different place.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .