title: ImageIO.createImageInputStream could not work on java platform se 7
body: <p>The code below works fine for previous versions but could not work after upgrading to Java 7.</p>
  
  <p>Can anyone help? </p>
  
  <p>Codes:</p>
  
  <pre><code>if (imageFile.exists())
  
  System.out.println(imageFile.getPath()+" :"+ imageFile.getName());
        // prepare to read the input
  
  final FileInputStream fis = new FileInputStream (imageFile);  
  
  ImageInputStreamiis=null;
  iis = ImageIO.createImageInputStream(fis);          
  final Iterator&lt;ImageReader&gt; imageReaders = ImageIO.getImageReaders(iis);
  ImageReader reader = imageReaders.next();
  reader.setInput(iis, true, false);
  </code></pre>
  
  <pre>
  Errors:
  C:\Users\apps\Documents\DSC_1244.jpg :DSC_1244.jpg
  Exception in thread "AWT-EventQueue-0" java.util.ServiceConfigurationError: javax.imageio.spi.ImageReaderSpi: Provider it.tidalwave.imageio.io.FileImageInputStream2Spi not a subtype
      at java.util.ServiceLoader.fail(ServiceLoader.java:231)
      at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
      at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:369)
      at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
      at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:210)
      at javax.imageio.spi.IIORegistry.(IIORegistry.java:138)
      at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
      at javax.imageio.ImageIO.(ImageIO.java:65)
      at hk.dawntech.digps2map.PhotoManagerImagePreview.paint(PhotoManagerImagePreview.java:50)
      at javax.swing.JComponent.paintToOffscreen(JComponent.java:5221)
      at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1482)
      at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1413)
      at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
      at javax.swing.JComponent._paintImmediately(JComponent.java:5169)
      at javax.swing.JComponent.paintImmediately(JComponent.java:4980)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:770)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
      at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
      at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
      at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:682)
      at java.awt.EventQueue$3.run(EventQueue.java:680)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
  </pre>