java.io.File compatibility problem.

Rutger Ovidius ovid@mailandnews.com
Fri Oct 17 20:03:00 GMT 2003


Hi,
With normal (Sun) java, a File("") object will return a canonicalPath of the 
current directory.
With gcj java, this returns a "java.io.IOException: GetFullPathName failed" 
Is this normal? It is causing compatibility problems when compiling SWT/JFace 
apps (and probably others..)
Tested on Windows with gcj 3.3.1, and gcj version 3.4 20031006 (experimental).
---
import java.io.File;
public class Main {
 public static void main( String[] args ) {
 File f = new File("");
 try {
 System.out.println( f.getCanonicalPath() );
 } catch ( Exception e ) {
 System.out.println( e );
 }
 }
}


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /