• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accessing the network drive real path in applet

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic