According to the URL spec, and common practice, Windows drive names, such as "D:" can be replaced in URLs with "D|". However, this doesn't work in JDK 1.3.1.
Attached is a simple testcase that illustrates this problem. Please modify urlStr so it points to a local HTML file.
When compiled and run like this:
java -classpath . FileTest
I get this exception:
file:///D|/Projects/tmp/fileurl/test.html
Exception: java.io.FileNotFoundException: \D|\Projects\tmp\fileurl\test.html (The filename, directory name, or volume label syntax is incorrect)
Substituting the appropriate file: url of course.
Attached is a simple testcase that illustrates this problem. Please modify urlStr so it points to a local HTML file.
When compiled and run like this:
java -classpath . FileTest
I get this exception:
file:///D|/Projects/tmp/fileurl/test.html
Exception: java.io.FileNotFoundException: \D|\Projects\tmp\fileurl\test.html (The filename, directory name, or volume label syntax is incorrect)
Substituting the appropriate file: url of course.