Cannot get resource
1. Getting resource
public static ImageIcon createImageIcon(String path) {
java.net.URL imgURL = GUImain.class.getResource(path);
if (imgURL != null) return new ImageIcon(imgURL)
else return null;
}
Call from application's constructor:
public GUImain(JFrame frame) {
...
ImageIcon objectIcon = createImageIcon("Img/objico.gif");
...
}
createImageIcon always return null independent from path i pass to it.
objico.gif presents in <path to application>/Img/objico.gif
2. How to get context path of the application?

