Unable to create temporary file ImageIO.read

P

phil89

Hi


I have following error messgz
http://192.168.17.2:80/infodev/ima-cli/horloge2 avec un nom b...
Unable to create temporary file
java.lang.SecurityException: Unable to create temporary file
at java.io.File.checkAndCreate(Unknown Source)
at java.io.File.createTempFile(Unknown Source)
at javax.imageio.stream.FileCacheImageInputStream.<init>(Unknown
Source)
at
com.sun.imageio.spi.InputStreamImageInputStreamSpi.createInputStreamInstanc­­e(Unknown
Source)
at javax.imageio.ImageIO.createImageInputStream(Unknown Source)
at javax.imageio.ImageIO.read(Unknown Source)

My Image is drawing into an JSCROLLEPANE and juste before i have
resize it and i need to change visible parameter to show my scollbar
this.setPreferredSize(otmpfond.getScrollSize());
this.setVisible(false);
this.setVisible(true);


Regards
Philippe
 
P

phil89

Hi,

Which directory is used when i load an Image with image IOREAD ?
My applet is signed ?

Regards
Philippe
 
J

John B. Matthews

phil89 said:
Which directory is used when load an Image with [ImageIO
#read()]?


I suppose it would depend on the directory you specified in your call to
read().
My applet is signed?

I do not know if your applet is signed. Even if it were, you would still
require permission from your operating system to create a temporary file
in whatever temporary-file directory is specified in createTempFile():
SecurityException: Unable to create temporary file

It looks like the default temporary-file directory is specified by the
system property java.io.tmpdir.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top