Saying 'it won't work' is quite uninformative. Does it compile? Are there exceptions? If the answers are yes and no respectively, where is the image you expect to load relative to this class?