I have an image wich I wanna load from a file, but I can't because I have a "java.io.IOException: Cannot read file" at runtime. I have a method like this to load the image:
private Image loadImageFile(String file)
{
try
{
return ((Image) Image.createImage(file));
}
catch(IOException e)
{
System.out.println("Can't load image " + file);
System.out.println("mensaje:" + e.getMessage());
e.printStackTrace();
return null;
}
and I call it this way "splash = this.loadImageFile("/logo.png""
What's going wrong?My image files are in a "res" named directory and I this code used to work properly a few days ago.
Any ideas?

;"
Reply With Quote



