I have been trying to use:
String fileLocation = "database/H1/S1/image.png";
Image image = Image.createImage(fileLocation);
to load an image file but I constantly get an IOException. The fileLocation is definitely correct as I have previously loaded text files from the same path, and I can see that the image.png definitely exists.
The documentation states:
public static Image createImage(String name) throws IOException
Throws IOException - if the resource does not exist, the data cannot be loaded, or the image data cannot be decoded
The next step would be to check these conditions but I have no idea how to do a fileexists type check in JavaME etc.
Any help would be appreciated.