Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Spaces in file names

807605Sep 27 2007 — edited Sep 27 2007
I'm having a problem with spaces in the path name on a windows computer. Here's the issue:

I use ClassLoader.getResource(filename) to retrieve a URL to a file. I thenk use url.getFile() to return a file. The problem is that this file name still has %20 instead of " " in the file name. When I go to do listFiles in that path, I get nothing found.

Anyone seen anything like this? Any ideas on how to fix it?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 25 2007
Added on Sep 27 2007
4 comments
1,151 views