Note that File#toURL() is "fragile" and you should go through the hoops
described in the javadoc for this method instead...

Phil :n.

On Tue, 2005-05-03 at 10:04 -0400, Keith Suderman wrote:
> At 03:06 PM 5/1/2005 +0200, Joern Muehlencord wrote:
> 
> >Whats wrong? Any suggestions? Thanks alot!
> 
> Change:
>      java.net.URL schemaURL = new java.net.URL("file://"+fileName);
> 
> 
> To:
>      java.net.URL schemaURL = new java.net.URL("file:/" + fileName);
> 
> and all should be fine.
> 
> Also, a sure-fire way to create a URL for a file is to use:
> 
>          File file = new File(fileName);
>          URL schemaURL = file.toURL();
> 
> Hope this helps,
> Keith
> 
> 
> --------------------------------------------------
> Research Associate
> American National Corpus
> [EMAIL PROTECTED]
> http://americannationalcorpus.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to