Print

Print


On Fri, Jan 10, 2014 at 4:10 PM, Sanchez, Ricardo <[log in to unmask]> wrote:

>  Thanks for the reply. Unfortunately it looks like toURL(), a File
> method, has been deprecated
>

The stackoverflow solution I shared did not use the File class.  It used
the URL class (
http://docs.oracle.com/javase/6/docs/api/java/net/URL.html#toURI%28%29).

I've attached example code based on the stackoverflow solution, Test.java.
 Even though the toString() invocation still shows the "%20", you can see
from the output below that it runs correctly:

Does file:/tmp/some%20dir exist? false
Does file:/tmp/some%20dir exist? true
Does file:/tmp/bogus%20dir exist? false
Does file:/tmp/bogus%20dir exist? false

("/tmp/some dir" was an actual file whereas, naturally, "/tmp/bogus dir"
was not.)


>
>
> One more question. In both 1.5 and 1.4.1 demo zips there is a missing data
> file. I canít run the gridlock demo without roads_points_place.csv. Was
> that an intentional omission?
>
>
Nope.  I've attached the file.  Sorry it was missing as it *should* have
been in the distribution.