This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Java in General and the fly likes file path to url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "file path to url" Watch "file path to url" New topic
Author

file path to url

Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

Hi i wanna change a normal file path to url format . for instance file path: c:\MyFolder\Myfile.txt i wanna change this path to URL so how i can do that ?


Thanks,
Sherif
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44563
    
  34
With the appropriate method in the java.io.File class.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20136
    
  30

And once you've found that one, notice it is deprecated and read what you should use instead. It's all in the API


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: file path to url
 
It's not a secret anymore!