Skip to main content

ImageReader not found under Java Web Start runtime environment

2 replies [Last post]
hrishi_joshi
Offline
Joined: 2007-06-12

Hi All,

A method in my class has the following lines:

Iterator readers = ImageIO.getImageReadersByFormatName("tiff");
if (!readers.hasNext()) {
throw new Exception("TIFF reader not found in JAI - Image I/O !!!");
}
readTiffFile();

When I run that class with a main() without doing any special classpaths, it works fine on my Windows XP (Home edition) development machine. It finds a TIFF reader, and reads the TIFF file well.

When I package my class in a JAR and run it under Java Web Start environment on the same machine, it throws an exception for not finding the TIFF reader. I do not have any special CLASSPATHs setup in either modes. JAI - Image I/O 1.1 has been installed in my JDK 1.5.0_06.

Is there anything special I need to do to make ImageIO work in Java Web Start environment? Anything special like including ImageIO JARs in classpath at runtime through JWS environment?

Thanks,
- Hrishi.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tarun818
Offline
Joined: 2011-02-23

Hi hrishi_joshi,
I hvae also encountred same problem as you described.If you find any solution to fix this problem please share it with me.
Thanks in advance.

bpb
Offline
Joined: 2004-06-23

This is very likely the same problem as in this thread:

http://forums.java.net/jive/thread.jspa?threadID=27074&tstart=15

It's a problem of what the extension class loader can "see". From some internal discussions here with those more expert than I it appears that the local and Web Start installations are better not mixed when it is a matter of loading plugins via service providers. I would suggest using the JAI Image I/O Tools Web Start version available at jai-imageio-webstart.dev.java.net rather than installing it locally.

> Hi All,
>
> A method in my class has the following lines:
>
> Iterator readers =
> ImageIO.getImageReadersByFormatName("tiff");
> if (!readers.hasNext()) {
> throw new Exception("TIFF reader not found in JAI -
> Image I/O !!!");
> }
> readTiffFile();
>
> When I run that class with a main() without doing any
> special classpaths, it works fine on my Windows XP
> (Home edition) development machine. It finds a TIFF
> reader, and reads the TIFF file well.
>
> When I package my class in a JAR and run it under
> Java Web Start environment on the same machine, it
> throws an exception for not finding the TIFF reader.
> I do not have any special CLASSPATHs setup in either
> modes. JAI - Image I/O 1.1 has been installed in my
> JDK 1.5.0_06.
>
> Is there anything special I need to do to make
> ImageIO work in Java Web Start environment? Anything
> special like including ImageIO JARs in classpath at
> runtime through JWS environment?
>
>
> Thanks,
> - Hrishi.