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!

How to convert local path drive to UNC path

899964Nov 13 2011 — edited Nov 14 2011
Hi
Is there is any way to convert the local path to UNC path in java.

For eg String s = F:\Test\Data\hello.xml

Here "Data" folder is shared folder and my pc name is ram-pc. so i want to convert the above url as follows.

\\ram-pc\Data\hello.xml


is that possible in java. Can anybody tell me how to convert local path to UNC path in java.


Thanks
kris
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 12 2011
Added on Nov 13 2011
2 comments
1,053 views