I was trying the acm library and when I tried to use the GImage it can't find my image. I tried putting it everywhere and still it can't find it. Where does GImage look for an image(please be specific) thank you
GImage can't find my image
2.5k Views Asked by ptc referal At
2
There are 2 best solutions below
0

I was also having the same problem. I used the full-path and it worked, e.g.:
GImage img = new GImage("/Users/abc/java/programming/abc.jpg");
add(img);
Also, I just noticed that if you are using Eclipse, you can keep the image inside bin sub-directory and then you can use filename:
GImage img = new GImage("abc.jpg");
add(img);
For the above to work, your image should be at: /Users/abc/java/programming/bin/abc.jpg"
According to the docs. it specifically consists of the following steps: