urlDir.getFile().toString()  
Author Message
Dado





PostPosted: 2005-2-19 16:27:00 Top

java-programmer, urlDir.getFile().toString()
After this:

String dir = "c:/Program Files/"
file = new File(dir);

and this:

System.out.println(file.toString);

I got:

/C:/Program%20Files/

Can I use it in that case, in a FileDialog.setDirectory( file.toString()),
for example?

 
Ryan Stewart





PostPosted: 2005-2-19 22:11:00 Top

java-programmer >> urlDir.getFile().toString() "Dado" <email***@***.com> wrote in message
news:cv6sn4$8on$email***@***.com...
>
> After this:
>
> String dir = "c:/Program Files/"
> file = new File(dir);
>
> and this:
>
> System.out.println(file.toString);
>
> I got:
>
> /C:/Program%20Files/
>
> Can I use it in that case, in a FileDialog.setDirectory( file.toString()),
> for example?
>
I couldn't tell you without looking it up. Did you look it up? Did you try it?
You will get better results if you post to comp.lang.java.help. This group is
deprecated.


 
Dado





PostPosted: 2005-2-20 16:29:00 Top

java-programmer >> urlDir.getFile().toString() Ryan Stewart wrote:

> "Dado" <email***@***.com> wrote in message
> news:cv6sn4$8on$email***@***.com...
>>
>> After this:
>>
>> String dir = "c:/Program Files/"
>> file = new File(dir);
>>
>> and this:
>>
>> System.out.println(file.toString);
>>
>> I got:
>>
>> /C:/Program%20Files/
>>
>> Can I use it in that case, in a FileDialog.setDirectory(
>> file.toString()), for example?
>>
> I couldn't tell you without looking it up. Did you look it up? Did you try
> it? You will get better results if you post to comp.lang.java.help. This
> group is deprecated.

No, I didn't get it the wanted FileDialog.setDirectory(file.toString())
directory.When I replace "%20" with the " " and remove the first '/', then
it works.