What's the protocol for local files using URL? I've downloaded a file using Java and I need to know how to access it, not using File, but using URL.
Asked
Active
Viewed 3.8k times
2 Answers
35
Unix
file://localhost/<path>
file:///<path>
Windows
file://localhost/<drive>|/<path>
file:///<drive>|/<path>
file://localhost/<drive>:/<path>
file:///<drive>:/<path>
For more information see the related Wikipedia article.
![](../../users/profiles/433835.webp)
Kohányi Róbert
- 8,681
- 3
- 46
- 74
7
You may use file:/// and file path. For e.g. file:///c:/temp.txt
![](../../users/profiles/959.webp)
jatanp
- 3,736
- 4
- 35
- 42
-
Thanks, I'll try using that now. – Ziddia Dec 06 '11 at 20:05