applet within browser not releasing file resource
hi,
I have an applet for ftp images upload.
run from eclipse IDE (which uses applet viewer) the applet is ok.
if i run my applet from browser here is what happens:
i upload a file .& leave the browser opened.
i then open this same file with gimp or photo-shop & getfile in use error.
if i close browser & try opening file .it works ok.
why the file isn't released when applet instance still on browser ?
is there a fix to this issue ?
thanks for helping .
thanks for prompt reply.
yes i close all streams...
the core method i use to upload files is below (client is a FTPClient object)
private synchronized void putFile(File file, String remoteFile)
throws FileUploadException {
String sFile = null;
try {
sFile = r.chomp(remoteFile, '/');
client.put(file.getAbsolutePath(), sFile + file.getName());
r.numBytes += file.length();
} catch (Exception e) {
//e.printStackTrace();
try {
retry(file, sFile);
} catch (Exception e1) {
throw new FileUploadException(e1.getMessage());
}
}
}
what am i doing wrong ?
Hi ,
i went through my code to detect the source of this obscure problem
I'm sure i don't open any stream at all .I'm only using java File Object & this one doesn't need to be closed or disposed in someway. am i right ?
if this is true ,what other operation could cause this locking issue ?
i appreciate your help on this.
thanks.