Re: Java Web Start
- From: Robert Larsen <robert@xxxxxxxxxxxx>
- Date: Mon, 23 Apr 2007 14:17:41 +0200
Andrew Thompson wrote:
Robert Larsen wrote:It seems so:
OTOH, those paths look decidedly wrong.Actually the url's were correct and yours is wrong :-)
Here is an example URL for a file on the D: drive
of my local system.
file:/D:/projects/TellURL.java
(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).
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.
.
- Follow-Ups:
- Re: Java Web Start
- From: Lew
- Re: Java Web Start
- References:
- Java Web Start
- From: Keith McCutcheon
- Re: Java Web Start
- From: Keith McCutcheon
- Re: Java Web Start
- From: Robert Larsen
- Java Web Start
- Prev by Date: Re: Java Web Start
- Next by Date: Re: Java Web Start
- Previous by thread: Re: Java Web Start
- Next by thread: Re: Java Web Start
- Index(es):