There is several static methods in ImageIO that allow to read images from different sources. The most interesting in your case are:
BufferedImage read(ImageInputStream stream)
BufferedImage read(File input)
BufferedImage read(InputStream input)
I checked inside in the code. It uses the ImageReader abstract class, and there is three implementors: JPEGReader. PNGReader and GIFReader. These classes and BufferedImage do not use any native methods apparently, so it should always work.
It seems that the AWTError you have is because you are running java in a headless configuration, or that the windows toolkit has some kind of problem. Without looking at the specific error is hard to say though. This solution will allow you to read the image (probably), but depending on what you want to do with it, the AWTError might be thrown later as you try to display it.