BufferedImage foo;
[...]
try{
foo=ImageIO.read(new BufferedInputStream(getClass().getResourceAsStream("/images/foo.png")));
}catch(IOException e){
e.printStackTrace();
}
ImageIO cant read TGAs right now (out of the box... there is a tga reader for it from realityinteractive).
You can find a simple demo application (source included) here:
http://kaioa.com/k/jarimage.jar"c://mypic.jpg" is really really bad btw

edit: Oh and one advantage of ImageIO is that it loads synchronously. That means that the image is fully loaded after the method returned. So, you dont need to fiddle around with MediaTracker or anything like that.