• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing the network drive real path in applet

 
ParagS Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
ParagS Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic