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 & get file 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 ?
i 'm sure 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());
}
}
}
is there a fix to this issue ?
thanks for helping .