diff -r d31b7cc371ef -r 77d9c0f1c19f jdk/test/java/io/FileInputStream/LargeFileAvailable.java --- a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java Thu Jan 13 22:21:58 2011 -0800 +++ b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java Fri Jan 28 09:28:43 2011 +0000 @@ -31,6 +31,7 @@ import java.io.*; import java.nio.ByteBuffer; import java.nio.channels.*; +import java.nio.file.Files; import static java.nio.file.StandardOpenOption.*; public class LargeFileAvailable { @@ -85,7 +86,7 @@ // Create a large file as a sparse file if possible File largefile = File.createTempFile("largefile", null); // re-create as a sparse file - largefile.toPath().delete(); + Files.delete(largefile.toPath()); try (FileChannel fc = FileChannel.open(largefile.toPath(), CREATE_NEW, WRITE, SPARSE)) {