|
Comments
|
Submitted On 02-APR-2003
ammwuh
I don't know if this is related, but I've been having problems
with decoding BMP images using JAI.create("url",...), both
with certain images being decoded into a corrupted form, and
others failing to decode with a
java.lang.ArrayIndexOutOfBoundsException.
This was *only* happening when running in an applet - and
I've finally managed to trace it to the code in question
attempting to create a file in the temp folder and failing
because of the applets tightened up security policy.
The workaround was to supply a user/system policy file to the
JRE being used by the plugin to run the applet that specified:
____
grant codeBase "http://yourserver/-" {
permission java.io.FilePermission "${java.io.tmpdir}${/}
*", "read, write, delete";
};
____
If this the problem, presumably it can be avoided in future
releases by using an in-memory buffer/stream to decode
rather than storing the file in the local tmp directory.
Also, it only happens with certain BMPs - most work fine.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|