Re: Java Web Start



Andrew Thompson wrote:
Robert Larsen wrote:
OTOH, those paths look decidedly wrong.
Here is an example URL for a file on the D: drive
of my local system.

file:/D:/projects/TellURL.java
Actually the url's were correct and yours is wrong :-)

(snip RFC 1738 detail)

Interesting, but... The URL shown above, is what
Java printed out when I ran the code. Are you
saying Java's handling of URL's is buggy*?

* That would not entirely surprise me, there was the
entire matter of deprecating File.toURL() over toURI()
(though in this instance - I am seeing exactly the
same output for both).

It seems so:
robert-desktop:~/code $ cat Test.java
import java.net.URL;
import java.net.URI;
public class Test {
public static void main(String args[]) throws Exception {
System.out.println(new URL("file:///home/robert"));
System.out.println(new URI("file:///home/robert"));
}
}
robert-desktop:~/code $ javac Test.java
robert-desktop:~/code $ java Test
file:/home/robert
file:///home/robert
robert-desktop:~/code $

I have never had problems using file:///some/path URL objects so Java
probably handles them correctly but prints them out wrong.
.