Name: joT67522 Date: 08/22/97
This is sample code for a java application. The renameTo method works
on a local file system. When the renameTo is used to rename a file
on the local file system to a NFS mounted path it fails. It does
not throw an exception. This application is running on Solaris.
final public void Close(){
if(fevents != null){
System.out.println("IN CLOSE " + Filename);
try{
fevents.close();
fevents = null;
if(renamefile == true){
System.out.println("Rename from " + tempfile);
System.out.println("Rename to " + Filename);
File tempf = new File(tempfile);
File newf = new File(Filename);
if(newf.exists() == true)
newf.delete();
tempf.renameTo(newf);
renamefile = false;
Filename = null;
}
}catch(Exception e){
System.out.println("Exception Close " + e);
exceptionLog("CLOSE",e);
}
}
if( sourceData != null){
try{
sourceData.close();
sourceData = null;
}catch(Exception e){
exceptionLog("CLOSE",e);
}
}
}
company - Digital Solutions, Inc. , email - ###@###.###
======================================================================
- duplicates
-
JDK-4136096 Temp file doesn't work properly with File.renameTo() on Solaris
-
- Closed
-
-
JDK-4368021 Html converter -backup option does not change anything
-
- Closed
-