import java.io.*; public class Test { public static void main (String[] args) throws Exception { File root = new File ("/tmp/fstst/"); File f = new File (root,"ä‹Þ"); if (!f.mkdirs()) { System.out.println ("Cannot create file: " + f.getAbsolutePath()); System.exit (1); } if (!f.exists()) { System.out.println ("File does not exist after mkdir"); System.exit (2); } File f2 = new File (root,"ä‹Þ"); if (!f2.exists()) { System.out.println ("File second instance does not exist after mkdir"); System.exit (3); } File[] files = root.listFiles (); if (!f.equals(files[0])) { System.out.println ("File " + f.getAbsolutePath() +" is not equal to "+files[0].getAbsolutePath()); System.exit (4); } System.out.println ("OK"); System.exit (0); } }