A JAR file contains an image named \"images Fall.png\". Java class named Foo, also contained in the same JAR file, attempts to read the image with the following code: URL url = Foo .class .getResource (\"images/fall.png\"); Imagelcon image = new ImageIcon(ur1); The program compiles but fails to load the image. What is wrong? Solution Here if we go via syntax then its fine hence compiled successfully but if you try to run it it will fail to load the image as it won\'t be able to find the file because its unable to locate fall.png as resoucre naming in jar file is case sensitive and in your call your are trying to load an image with name fall.png where image with Fall.png is present not fall.png..