What are some characteristics of byzantine icons?

I'm working on a Java program that uses icon files. The icons are stored in a folder "Icons" in \src. The code to access an icon is : image1 = new ImageIcon (Control.PrimaryGameFrame.class.getClassLoader().getResource ("Icons/openFile.gif")); The program runs properly in Eclipse but not the runnable

  • The program runs properly in Eclipse. But when I export its runnable jar to a folder "abc", then it needs the "Icons" folder to be present in "abc". If I place the jar alone at a place, it doesn't load the icons.What changes are to be made to the code, for the jar to find the icon files in itself & not in the folder it is in?

  • Answer:

    put the jar in the CLASSPATH and then run the program again. set CLASSPATH=%CLASSPATH%;C:\work\runnable.jar Also for questions like these, you will get a better response on http://stackoverflow.com/

Vikash Kodati at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.