File.exists() does not work on files > 2GB. It doesn't work on JDK1.2.1_03
and up. It works on JDK1.1.6.
Instructions to reproduce:
1) mkfile 2050m twogig
2) Compile and run java program below:
import java.io.*;
public class FileExists {
public static void main(String argv[]) {
File fl = new File("/export/file_exists/twogig");
if (fl.exists())
System.out.println("Exists length - " + fl.length());
else
System.out.println("Doesn't exist");
}
}
and up. It works on JDK1.1.6.
Instructions to reproduce:
1) mkfile 2050m twogig
2) Compile and run java program below:
import java.io.*;
public class FileExists {
public static void main(String argv[]) {
File fl = new File("/export/file_exists/twogig");
if (fl.exists())
System.out.println("Exists length - " + fl.length());
else
System.out.println("Doesn't exist");
}
}
- relates to
-
JDK-4290024 java.io.RandomAccessFile does not work on large files (1.3, hotspot & native)
-
- Resolved
-