aspose file tools*
The moose likes Applets and the fly likes Accessing the network drive real path in applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Accessing the network drive real path in applet" Watch "Accessing the network drive real path in applet" New topic
Author

Accessing the network drive real path in applet

ParagS Kulkarni
Ranch Hand

Joined: Oct 04, 2004
Posts: 60
If I have a mapped driver letter g: that referes to
\\servername\d\foldername

How do I get java to convert it from g: to the real path(\\servername\d\foldername) so I can use
it in my applet?
My applet is signed applet I can access local resources in it.


Thanks, Parag
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41884
    
  63
Why can't you use the actual server name directly? The jCIFS API can do that cross-platform (only a Windows JRE knows how to do that using the java.io classes).


Ping & DNS - my free Android networking tools app
ParagS Kulkarni
Ranch Hand

Joined: Oct 04, 2004
Posts: 60
Thank Ulf, for the suggesting one of the way.

I got a simple solution. I don't know it will be considered as good practice or not.
My solution is:
My target platform is window only & it will be windows.
I did one thing I issued a command "net use" on command prompt through the code. Captured its output & parsed the required String there.
My applet will be called 5-10 times only in a day. So this should not hit the performance.

Still I will work on jCIFS.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing the network drive real path in applet