title: Java ImageIO IIOException: Unsupported image type?
body: <p>Working with images in Java for the first time and am getting some bizarro exceptions that aren't documented very well.  Here's the line of code that is failing:</p>
  
  <pre><code>BufferedImage imgSelected = ImageIO.read(new File("/abs/url/to/file/image.jpg"));
  </code></pre>
  
  <p>This line is throwing an IIOException with <em>Unsupported image type</em> as the exception message.  I have checked and re-checked that it is in fact this line throwing the exception, that the File object is valid, that the URL is valid, and that the <code>image.jpg</code> is in fact a valid JPG that loads perfectly fine in other image viewers.</p>
  
  <p>What could I do to get more information about the nature of this exception? Is this the traditional way for loading images in Java 7, or is this an old/deprecating method? There's just not a lot of info out there about these "Unsupported image type" exceptions, and surely, ImageIO supported JPGs!</p>
  
  <p>Thanks for any help!</p>