1
\$\begingroup\$

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

\$\endgroup\$
  • \$\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 '13 at 2:31
3
\$\begingroup\$

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

src/trace/game/core/game.jpg

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.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.