Name: el35337 Date: 03/09/98
java.io.File.getCanonicalPath reports a java.io.IOException
if passed a UNC path name (e.g. \\galaxi\share\VT),
even if the specified UNC path is fully valid. A simple
test program its execution and results are included
below.
------------- The test program -------------
import java.io.File;
import java.io.IOException;
public class TF {
static public void main(String argv[]) throws IOException {
File f1 = new File(argv[0]);
System.out.println("canonical path = " + f1.getCanonicalPath());
}
------------- The execution and error -----------
C:\java TF \\galaxi\share\VT
java.io.IOException: bad path error
at java.io.File.canonPath(Native Method)
at java.io.File.getCanonicalPath(File.java:239)
at TF.main(TF.java:7)
(Review ID: 26125)
======================================================================
- duplicates
-
JDK-4032066 java.io: File classes do not recognize Windows UNC filenames (win32)
-
- Closed
-