[kaffe][gump] java.io.File's delete does not remove links
Davanum Srinivas
dims at yahoo.com
Sun Dec 19 15:28:43 PST 2004
Team,
This problem is killing ant's bootstrap.sh stuff. Works fine on JDK1.4.
Step #1: Set up the link as follows:
mkdir /tmp/ant
ln -s /tmp/ant /tmp/ThisIsALink
Step #2: Compile the following java source file:
==============================================================================================
import java.lang.*;
import java.io.*;
public class test {
public static void main(String[] argv) throws Exception {
File linkFile = new File("/tmp", "ThisIsALink");
System.out.println(linkFile.getCanonicalPath());
if (!linkFile.delete()) {
throw new RuntimeException("Failed to delete " + linkFile);
}
}
}
==============================================================================================
Step #3: run it and see the following exception:
/tmp/ThisIsALink
java.lang.RuntimeException: Failed to delete /tmp/ThisIsALink
at test.main (test.java:9)
Thanks,
dims
=====
Davanum Srinivas - http://webservices.apache.org/~dims/
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
More information about the kaffe
mailing list