This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Patch: URLClassLoader change


> Jeroen: Could you check that File.toURL() does the correct thing with
> IKVM.NET?

Code:
System.out.println(new File("foo.txt").toURL());
System.out.println(new File("c:\\tmp\\bar.txt").toURL());
System.out.println(new File("c:\\tmp\\..\\bar.txt").toURL());

Output of Sun JRE 1.4.1:
file:/C:/vsp/bytecode.old/Test/bin/Debug/foo.txt
file:/c:/tmp/bar.txt
file:/c:/tmp/../bar.txt

Output IKVM.NET:
file:c:/vsp/bytecode.old/test/bin/debug/foo.txt
file:c:/tmp/bar.txt
file:c:/bar.txt

The leading slash on Sun's JRE is strange, but then again I don't pretend to
understand file URLs. I don't like the normalization that is going on (both
the processing of .. and making the path lowercase).

(Irrelevant) sidebar: Years ago when I got one of my apps certified as 100%
Pure Java (ugh), I actually ran JDK 1.1 on Windows on a case sensitive file
system (NTFS supports case-sensitivity, with the right switches). This
helped me to find all of the case bugs in my code (without having to run on
*nix). If File insists on changing the case, such things wouldn't be
possible.

Regards,
Jeroen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]