I have created a .jar using IntelliJ IDEA by Build 'xxxPackage' artifact. And I have got xxxPackage.jar package. However, when I try to start it by double-click, the program starts without showing any icons nor images which should be included as resources.
My project directory is like
in which, the 'res' contains all the icon and images in .png files, and xxx folder contains my .java codes. And I use the icon as:
Icon openIcon = new ImageIcon("src/res/fullscreen_16.png");
If I start the program using IDE directly, these icons and images show correctly.
I am wondering how to set the 'Project Structure' in oder to read those resources files when I start the xxxPackage.jar.
Thanks a lot.