470,848 Members | 1,690 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

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?

Jul 17 '05 #1
2 2532
"Dado" <ma*********@inet.hr> wrote in message
news:cv**********@sunce.iskon.hr...

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.
Jul 17 '05 #2
Ryan Stewart wrote:
"Dado" <ma*********@inet.hr> wrote in message
news:cv**********@sunce.iskon.hr...

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.
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by nome | last post: by
reply views Thread by nome | last post: by
7 posts views Thread by BBFrost | last post: by
1 post views Thread by Kyle Kaitan | last post: by
6 posts views Thread by Joe | last post: by
4 posts views Thread by elventear | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.