The following code returns the current working directory with a trailing
slash on JDK 1.1.6 but does not return a path with a trailing slash
on 1.2 FCS.
This functionality is used in the Spec benchmark application.
import java.io.*;
// Test of File Open
class FileOpen {
public static void main (String args[]) {
System.out.println( (new File("")).getAbsolutePath() );
}
}
slash on JDK 1.1.6 but does not return a path with a trailing slash
on 1.2 FCS.
This functionality is used in the Spec benchmark application.
import java.io.*;
// Test of File Open
class FileOpen {
public static void main (String args[]) {
System.out.println( (new File("")).getAbsolutePath() );
}
}
- duplicates
-
JDK-4150815 java.io.File.getPath() does not preserve trailing separator characters
-
- Closed
-
- relates to
-
JDK-4131169 java.io.File: Respecify using abstract pathnames rather than strings
-
- Closed
-