This seems to be related to your path to the image. When you expand a variable, this value
./res/Images
but from your third example, it looks like the image is on the class path in
/Images/imageFile.png
So try changing ImagePath to:
public static final String ImagePath = "/Images/";
(: ), , , "". , , "res" , .
, :
myProject
+
| +
| \
\
myProject res , File:
new File("./res/Images/...");
classPath.getResourceAsStream("/Images/...");