This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
RE: Patch: URLClassLoader change
- From: "Jeroen Frijters" <jeroen at sumatra dot nl>
- To: "'Mark Wielaard'" <mark at klomp dot org>,<tromey at redhat dot com>
- Cc: "'Anthony Green'" <green at redhat dot com>,"'Java Patch List'" <java-patches at gcc dot gnu dot org>
- Date: Tue, 31 Dec 2002 09:25:24 +0100
- Subject: 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